Remove json indent for easing parsing
Indentation while it is nice, leads to issues when parsing where delimiters on readline() will fail since we are sending many self contained json's in a streaming fashion, having a proper readline() based delimiter is helpful in terms of parsing.
This commit is contained in:
@@ -53,7 +53,6 @@ type Theme struct {
|
||||
Dir *color.Color
|
||||
Command *color.Color
|
||||
SessionID *color.Color
|
||||
JSON *color.Color
|
||||
Bar *color.Color
|
||||
PrintC *color.Color
|
||||
Print *color.Color
|
||||
@@ -258,14 +257,6 @@ var (
|
||||
}
|
||||
return fmt.Sprintf(format, data...)
|
||||
}
|
||||
|
||||
// JSON helper to print json strings
|
||||
JSON = func(format string, data ...interface{}) string {
|
||||
if isatty.IsTerminal(os.Stdout.Fd()) {
|
||||
return themesDB[currThemeName].JSON.SprintfFunc()(format, data...)
|
||||
}
|
||||
return fmt.Sprintf(format, data...)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -30,7 +30,6 @@ var MiniTheme = Theme{
|
||||
SessionID: (color.New(color.FgYellow, color.Bold)),
|
||||
Size: (color.New(color.FgYellow)),
|
||||
Time: (color.New(color.FgGreen)),
|
||||
JSON: (color.New(color.FgWhite, color.Italic)),
|
||||
Bar: (color.New(color.FgGreen, color.Bold)),
|
||||
PrintC: (color.New(color.FgGreen, color.Bold)),
|
||||
Print: (color.New()),
|
||||
@@ -48,7 +47,6 @@ var WhiteTheme = Theme{
|
||||
SessionID: (color.New(color.FgWhite, color.Bold)),
|
||||
Size: (color.New(color.FgWhite, color.Bold)),
|
||||
Time: (color.New(color.FgWhite, color.Bold)),
|
||||
JSON: (color.New(color.FgWhite, color.Bold, color.Italic)),
|
||||
Bar: (color.New(color.FgWhite, color.Bold)),
|
||||
PrintC: (color.New(color.FgWhite, color.Bold)),
|
||||
Print: (color.New()),
|
||||
@@ -66,7 +64,6 @@ var NoColorTheme = Theme{
|
||||
SessionID: new(color.Color),
|
||||
Size: new(color.Color),
|
||||
Time: new(color.Color),
|
||||
JSON: new(color.Color),
|
||||
Bar: new(color.Color),
|
||||
PrintC: new(color.Color),
|
||||
Print: new(color.Color),
|
||||
|
||||
Reference in New Issue
Block a user