Make free standards compliant

This commit is contained in:
Ian Adam Naval 2014-09-16 22:00:50 -04:00
parent d621f8d765
commit dc064e8ea7

View File

@ -74,13 +74,20 @@ func parseMemInfo() jsh.JshFrame {
memInfo[key] = val memInfo[key] = val
} }
finalOut := jsh.JshFrame{memInfo, errors} // Wrap with array
stdOut := []map[string]jsh.MemStat{memInfo}
finalOut := jsh.JshFrame{stdOut, errors}
return finalOut return finalOut
} }
func runJsonMode() { func runJsonMode() {
output := parseMemInfo() output := parseMemInfo()
fmt.Println("%s", *output.ToJson()) queue := make(chan *jsh.JshFrame)
done := make(chan bool)
go jsh.OutputFrames(queue, done)
queue <- &output
close(queue)
<-done
} }
func main() { func main() {