(value interface{})
| 142 | } |
| 143 | |
| 144 | func printAsJSON(value interface{}) { |
| 145 | asJs, err := json.Marshal(value) |
| 146 | if err != nil { |
| 147 | fmt.Printf("Failed to marshal value to json: %s", err) |
| 148 | os.Exit(1) |
| 149 | } |
| 150 | fmt.Println(string(asJs)) |
| 151 | } |
no test coverage detected