flagly
flagly copied to clipboard
generate and load settings file
Sometimes the list of command line options can grow big.
I would like to have an option to generate a settings file with all default values and comments. So that the users can customize it. And another option to load the settings file instead of reading CLI args.
I think writing a big struct is also suitable for large numbers of options.
But if you want that users can customize it in runtime, it needs to handle a map[string]interface{}
variable to get all of the options. I think that is unsafe or will not be implemented in flagly
.
I mean the user can adjust the exported setting file.
@chrislusf, Would you give me an example? BTW, commands can generate in runtime.