in go/cmd/server/server.go [83:108]
func createJSONResponse() string {
mu.Lock()
defer mu.Unlock()
s := ""
if len(lms) > 0 {
m := jsonpb.Marshaler{}
s = "["
for _, lm := range lms {
// TODO(dannark): Use m.Marshal(w, pb) to Marshall into json object
// then put those objects in a list and then send the list??
// marshal current element to json string
js, _ := m.MarshalToString(&lm)
s += js
s += ", "
}
// remove trailing comma
s = s[:len(s)-2]
s += "]"
} else {
s = "\"No log messages received yet.\""
}
return s
}