Closed rockaut closed 4 years ago
Have to write doc/readme - basic changes:
With Cobra/Viper we have global and local cli flags. Global are for the main program and local for the defined commands like get. Sub-Commands might derive args/flags from parent-commands.
Example:
dynatrace-config -t APITOKEN -u APIURL get -f file/to/json
Also we have now config and environment variables support:
DC_APIURL="https://url.todynatrace.dev/e/xx-xx-xx/api"
DC_APITOKEN="asdf"
Where the DC_ prefix can be changed through an config file. Currently this file is loaded from
The filename has to be .dynatrace-config.yaml
apiurl: "https://url.todynatrace.dev/e/xx-xx-xx/api"
apitoken: "lksajdf"
envVarsPrefix: "WHATEVER_"
Conflict is on adding config/ to uri. If you agree with that issue #18 we can overwrite and change the other files too. If not I will reverse the conflict.
After merge I have already some subsequent issues prepared but I think we should first merge that to get the base started.
fixes #9 fixes #12