formatFileName Returns a file name based on provided string and number
(name string, index int)
| 115 | |
| 116 | // formatFileName Returns a file name based on provided string and number |
| 117 | func formatFileName(name string, index int) string { |
| 118 | split := strings.Split(name, ".") |
| 119 | |
| 120 | n := split[len(split)-2] |
| 121 | split[len(split)-2] = fmt.Sprintf("%v-%x", n, index+1) |
| 122 | |
| 123 | return strings.Join(split, ".") |
| 124 | |
| 125 | } |
| 126 | |
| 127 | // OutputToFile Outputs perfops response to a file or multiple files if more than one check is being ran. |
| 128 | func OutputToFile(f *Formatter, output *perfops.RunOutput, fileOut string) { |