EncodeJSON encodes a value into a byte array. This is intended for testing purposes.
(x interface{})
| 68 | // EncodeJSON encodes a value into a byte array. This is intended for |
| 69 | // testing purposes. |
| 70 | func EncodeJSON(x interface{}) []byte { |
| 71 | data, err := json.MarshalIndent(x, "", " ") |
| 72 | if err != nil { |
| 73 | panic(err) |
| 74 | } |
| 75 | data = append(data, '\n') |
| 76 | return data |
| 77 | } |
| 78 | |
| 79 | // TestUI implements the plugin.UI interface, triggering test failures |
| 80 | // if more than Ignore errors not matching AllowRx are printed. |
no outgoing calls
searching dependent graphs…