flagly icon indicating copy to clipboard operation
flagly copied to clipboard

generate and load settings file

Open chrislusf opened this issue 9 years ago • 3 comments

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.

chrislusf avatar Feb 11 '16 08:02 chrislusf

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.

chzyer avatar Feb 11 '16 15:02 chzyer

I mean the user can adjust the exported setting file.

chrislusf avatar Feb 11 '16 15:02 chrislusf

@chrislusf, Would you give me an example? BTW, commands can generate in runtime.

chzyer avatar Feb 11 '16 15:02 chzyer