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:
Harshavardhana
2015-08-19 02:38:09 -07:00
parent f8fc43d76a
commit 60a29bae96
5 changed files with 27 additions and 32 deletions
-9
View File
@@ -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 (
-3
View File
@@ -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),