(debug bool)
| 233 | } |
| 234 | |
| 235 | func requestBody(debug bool) (io.Reader, error) { |
| 236 | if !debug { |
| 237 | return nil, nil |
| 238 | } |
| 239 | params := &RerunPayload{ |
| 240 | debug, |
| 241 | } |
| 242 | |
| 243 | body := &bytes.Buffer{} |
| 244 | enc := json.NewEncoder(body) |
| 245 | if err := enc.Encode(params); err != nil { |
| 246 | return nil, err |
| 247 | } |
| 248 | return body, nil |
| 249 | } |