code: func prettyPrintJsonLines(b []byte) string {
  	parts := strings.Split(string(b), "\n")
  	for i, p := range parts {
  		if b := []byte(p); json.Valid(b) {
  			var out bytes.Buffer
  			json.Indent(&out, b, "", " ")
  			parts[i] = out.String()
  		}
  	}
  	return strings.Join(parts, "\n")
  }
docs: // prettyPrintJsonLines iterates through a []byte line-by-line,
  // transforming any lines that are complete json into pretty-printed json.