Commented out unecessary logging (should be under --verbose flag), tidy up command logic, implemented stop and start app commands

This commit is contained in:
Paulo Truta
2022-02-07 20:20:09 +00:00
parent 6a61ac4d17
commit 9ccb3f1d71
6 changed files with 78 additions and 43 deletions
+9
View File
@@ -4,6 +4,7 @@ import (
"bufio"
"bytes"
"database/sql"
"encoding/json"
"fmt"
"io"
"log"
@@ -12,6 +13,7 @@ import (
"strings"
"time"
"github.com/TylerBrock/colorjson"
"github.com/joho/godotenv"
)
@@ -186,3 +188,10 @@ func WriteOption(optionKey string, optionValue string) {
db.Close()
}
func ColorJsonString(jsonString string) string {
var obj map[string]interface{}
json.Unmarshal([]byte(jsonString), &obj)
resultJSON, _ := colorjson.Marshal(obj)
return string(resultJSON)
}