mirror of
https://github.com/edgebox-iot/edgeboxctl.git
synced 2026-09-30 08:35:45 +02:00
Commented out unecessary logging (should be under --verbose flag), tidy up command logic, implemented stop and start app commands
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user