-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(golang-rewrite): add config methods #24
Conversation
type PluginRepoCheckDuration struct { | ||
Never bool | ||
Every int | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not confident this is the way to go, but it works. Any user of this just needs to know that Every
should only be used when Never
is set to false.
@@ -61,7 +139,7 @@ func loadConfigEnv() (Config, error) { | |||
return config, err | |||
} | |||
|
|||
func LoadSettings(asdfrcPath string) (Settings, error) { | |||
func loadSettings(asdfrcPath string) (Settings, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason for this to be public.
}, nil | ||
} | ||
|
||
func YesNoToBool(section *ini.Section, key string, defaultValue bool) bool { | ||
func yesNoToBool(section *ini.Section, key string, defaultValue bool) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason for this to be public.
* Create PluginRepoCheckDuration struct to represent config value * Make some functions private * write basic tests for Config methods * Add Loaded field to Settings struct * Define constants for config default values
a1e3363
to
f0bbe8f
Compare
TODO