Skip to content

refactor: config package#130

Merged
nikoksr merged 5 commits intomasterfrom
refactor-config-package
Jul 7, 2020
Merged

refactor: config package#130
nikoksr merged 5 commits intomasterfrom
refactor-config-package

Conversation

@nikoksr
Copy link
Copy Markdown
Collaborator

@nikoksr nikoksr commented Jul 7, 2020

Summary

Completely refactor the config package. Make it simpler and more idiomatic.

Proposed Changes

  • Move config related code from cmd to config package
  • Parse main config to internal config struct
  • Load os specific base path only once
  • Creation of main config file is now done by default values and not by downloading it

nikoksr added 5 commits July 7, 2020 15:54
Extract all config related code from cmd/root and move it into the
config package. Refactor the config package too. It's now more idiomatic
and easier to read and use.
deploy now manages the creation of the main config folder and file. It
is called from cmd/init and initializes the main config folder, if it
does not exist.
Additionally it now doesn't download the main config no more but rather
creates a empty config instance, loads it default values and writes it
to memory.
@nikoksr nikoksr merged commit efc4f27 into master Jul 7, 2020
@nikoksr nikoksr deleted the refactor-config-package branch July 7, 2020 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant