(t *testing.T)
| 45 | } |
| 46 | |
| 47 | func TestTemplateSyntaxError(t *testing.T) { |
| 48 | template := "{{ .Seq }} {{.CPU}} {.Type}}" |
| 49 | _, err := NewFormatter(template) |
| 50 | require.Error(t, err, "template syntax error near field #3: {{ .Seq }} {{.CPU}} {.Type}}") |
| 51 | } |
| 52 | |
| 53 | func TestFormat(t *testing.T) { |
| 54 | template := "{{ .Seq }} {{.CPU}} - ({{.Type}}) -- pid: {{ .Params.Pid }} ({{.Params}}) {{ .Meta }}" |
nothing calls this directly
no test coverage detected