Repository navigation
all: Refactor preparing configuration - #7127
Merged
Merged
Conversation
imsodin
force-pushed
the
all/configRefactor
branch
from
November 19, 2020 14:18
63c81d6 to
ab46268
Compare
imsodin
force-pushed
the
all/configRefactor
branch
from
November 19, 2020 14:21
ab46268 to
ff8f833
Compare
2 of 3 tasks
calmh
approved these changes
Nov 20, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Working on configurable folder/device defaults, I noticed we do not ensure that the local device is always added to folders. We only check that when creating a new config, which is kind of useless. Adding that check requires the wrapper to know about it's own - which is why all the files not in lib/config changed. And working on
Configuration.preparemade my head spin, so I decided to split that up into smaller functions and methods on the sub-types. And while at it, I changedutil.SetDefaultsto recurse into structs, such that we only need to call it once at the top-level (the current way is repetitive and prone to error by forgetting a member).