(flagsMap map[string]string, c string)
| 181 | } |
| 182 | |
| 183 | func printFlagsTable(flagsMap map[string]string, c string) string { |
| 184 | buff := new(bytes.Buffer) |
| 185 | header := []string{"FLAGS", "VALUE"} |
| 186 | table := tablewriter.NewWriter(buff) |
| 187 | table.SetHeader(header) |
| 188 | for k, v := range flagsMap { |
| 189 | table.Append([]string{k, v}) |
| 190 | } |
| 191 | |
| 192 | headerColor := tablewriter.Colors{ |
| 193 | tablewriter.Bold, tablewriter.BgGreenColor} |
| 194 | table.SetHeaderColor(headerColor, headerColor) |
| 195 | table.SetColumnColor(tablewriter.Colors{ |
| 196 | tablewriter.Bold, tablewriter.FgHiRedColor}, |
| 197 | tablewriter.Colors{ |
| 198 | tablewriter.Bold, tablewriter.FgHiBlackColor}) |
| 199 | |
| 200 | table.SetCaption(true, c) |
| 201 | table.Render() |
| 202 | return buff.String() |
| 203 | } |
| 204 | |
| 205 | func assertEqualResult(t *testing.T, got, want testResult, msg string) { |
| 206 | if got != want { |
no outgoing calls
no test coverage detected