(stdout, stderr *bytes.Buffer)
| 250 | } |
| 251 | |
| 252 | func testPutJSONCmd(stdout, stderr *bytes.Buffer) *cobra.Command { |
| 253 | cmd := testPutCmd() |
| 254 | cmd.Flags().String(outputFlag, "text", "") |
| 255 | if err := cmd.Flags().Set(outputFlag, "json"); err != nil { |
| 256 | panic(err) |
| 257 | } |
| 258 | if stdout != nil { |
| 259 | cmd.SetOut(stdout) |
| 260 | } |
| 261 | if stderr != nil { |
| 262 | cmd.SetErr(stderr) |
| 263 | } |
| 264 | return cmd |
| 265 | } |
| 266 | |
| 267 | type putOutputData struct { |
| 268 | Input putCommandInput `json:"input"` |
no test coverage detected