(debug bool)
| 241 | } |
| 242 | |
| 243 | func requestBody(debug bool) (io.Reader, error) { |
| 244 | if !debug { |
| 245 | return nil, nil |
| 246 | } |
| 247 | params := &RerunPayload{ |
| 248 | debug, |
| 249 | } |
| 250 | |
| 251 | body := &bytes.Buffer{} |
| 252 | enc := json.NewEncoder(body) |
| 253 | if err := enc.Encode(params); err != nil { |
| 254 | return nil, err |
| 255 | } |
| 256 | return body, nil |
| 257 | } |