File: render_test.go

package info (click to toggle)
golang-github-nicholas-fedor-shoutrrr 0.8.17-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 4,332 kB
  • sloc: sh: 61; makefile: 5
file content (17 lines) | stat: -rw-r--r-- 407 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package format

import t "github.com/nicholas-fedor/shoutrrr/pkg/types"

type testEnummer struct {
	Choice int `default:"Maybe" key:"choice"`
}

func (testEnummer) Enums() map[string]t.EnumFormatter {
	return map[string]t.EnumFormatter{
		"Choice": CreateEnumFormatter([]string{"Yes", "No", "Maybe"}),
	}
}

func testRenderTree(r TreeRenderer, v any) string {
	return r.RenderTree(getRootNode(v), "mock")
}