diff options
author | Mukul Rawat <mukulsrawat@gmail.com> | 2018-10-15 20:19:25 +0530 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2018-10-15 10:49:25 -0400 |
commit | 9385dc750d59a4dcac168cbdba926892a467ad1d (patch) | |
tree | 54161870ac48d09e6bf31a8dd301071eb0210eaa /model | |
parent | 43bdbb0c3a0d93a8bf34ae5e2abbad4586a2581b (diff) | |
download | chat-9385dc750d59a4dcac168cbdba926892a467ad1d.tar.gz chat-9385dc750d59a4dcac168cbdba926892a467ad1d.tar.bz2 chat-9385dc750d59a4dcac168cbdba926892a467ad1d.zip |
[MM-12360] Created CLI command "config get" (#9534) (#9558)
* Added the get command to get the value of a config setting.
* Depending on the config setting it can work on any depth of the
setting.
* Added test for the get command.
* Add print tabs
* Remove excess else statements
* Return with the value and remove named return variable
* Refactor the printMap function and return a string, remove side effects
* Improve the error message, use the name argument
* Use app.Config() to create our config object
* Remove reading the file, make helper functions return string and perform printing inside the command
* Remove the tab printing
* Add extra quotes on the output
* Remove extra code for checking arguments and replaced it with cobra.ExactArgs(1)
* Remove buffer from printConfigValues
* Add some tests to check the output of the command
* Write test for the function 'structToMap' and test for complext nested structs
* Write test for the function 'configToMap' and test for complext nested structs
* Write test for the function 'printMap' and test for complext maps as input
* Write test for the function 'printConfigValues' and test for complext maps as input
* Remove commented code
* Update the description of the command
Diffstat (limited to 'model')
0 files changed, 0 insertions, 0 deletions