Closed xsteadfastx closed 3 years ago
this would be just a beginning. next thing would be adding flags for the things the prompt asks for.
Excellent, this looks great.
Not as part of this PR but what would you think of maybe using viper to handle the config in general, as it supports other formats too?
Excellent, this looks great.
Not as part of this PR but what would you think of maybe using viper to handle the config in general, as it supports other formats too?
yes this would be great... in the init command we could add a flag for the config file format you want to have... json standard and yaml/toml as option.
Thanks @xsteadfastx -- will review and test this as soon as I can. Cobra/viper seems to be the library to use.
Regarding supporting toml or other configuration file support; this isn't an option as the configuration file (well, database) is edited programmatically so comments can't be retained.
Thanks
i never used this but viper also supports writing config files... so there is a chance to support multiple formats: https://github.com/spf13/viper#writing-config-files
but this is just... a niche feature :)
i hope my PR is ok and that you find it useful. thank you for this wonderful piece of software... making everything a little easier!
Btw, just tested it in a productive environment for myself and i could add all the new peers in a scripted way, with success!
note for myself -- check out https://github.com/AlecAivazis/survey for the interactive stuff.
Sorry @xsteadfastx still haven't got round to reviewing. Will do in the next week hopefully
no problem :) i just can say we use my PR fork here in production... generating alot of client configs on the fly through ansible... without any problems so far :)
no problem :) i just can say we use my PR fork here in production... generating alot of client configs on the fly through ansible... without any problems so far :)
That's very encouraging. Nice to hear it's a useful tool
Hey @xsteadfastx I created a PR with some suggestions against your branch https://github.com/xsteadfastx/dsnet/pull/1
I think we probably want to keep the CLI interface backwards compatible and not have the usage confusing when using the CLI as a human and not a script
Hey @xsteadfastx I created a PR with some suggestions against your branch xsteadfastx#1
I think we probably want to keep the CLI interface backwards compatible and not have the usage confusing when using the CLI as a human and not a script
yes this is a really good idea. cool thanks for your input to get this merged and be compatible... :)
Thank you @xsteadfastx !
This PR is the plan to include cobra and viper to dsnet for abilities for non-interactive use like suggested in #17.