Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Use nil-able fields in sugar sections #155

Merged
merged 2 commits into from
May 18, 2018
Merged

Conversation

ajeddeloh
Copy link
Contributor

Fixes coreos/bugs#2431

After OOB discussion with @dgonyeo we decided that making everything nilable was both easier and less error prone than auditing every field. It also future proofs it.

Throw in a commit to use gofmt -d instead of gofmt because I'm tired of running ./test then gofmt -d <some file>

Andrew Jeddeloh added 2 commits May 18, 2018 10:56
etcd, flannel, and locksmith all should have nil-able types since their
command line interfaces may assume a non-zero default value. If our
types are non-nilable then setting a field that has a non-zero default
value is impossible.

Make everything nil-able so we don't need to trawl through multiple
codebases to determine which fields should or should not be. This also
protects against changes in those projects breaking us.
Copy link
Contributor

@cgonyeo cgonyeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I look forward to the nil pointer exception bug reports 👍

@ajeddeloh ajeddeloh merged commit 8177496 into coreos:master May 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants