refactor: moving logging to command functions

easier to unit test our util commands like this
This commit is contained in:
2021-07-19 12:47:46 +01:00
parent bd9bc530d1
commit cfe2f70151
3 changed files with 42 additions and 25 deletions

View File

@ -56,7 +56,10 @@ var appListCommand = &cli.Command{
// FIXME: Needs to use flags
// TODO: Sorting of output to make servers in alphabetical
// Looks like sorting a 2d slice of strings might be messy though
apps := config.LoadAppFiles()
apps, err := config.LoadAppFiles()
if err != nil {
logrus.Fatal(err)
}
tableCol := []string{"Name", "Type", "Server"}
table := createTable(tableCol)
for name, appFile := range apps {