github.com/bingoohuang/gg@v0.0.0-20240325092523-45da7dee9335/pkg/man/common_test.go (about) 1 package man 2 3 import ( 4 "testing" 5 ) 6 7 type testList []struct { 8 name, got, exp string 9 } 10 11 func (tl testList) validate(t *testing.T) { 12 for _, test := range tl { 13 if test.got != test.exp { 14 t.Errorf("On %v, expected '%v', but got '%v'", 15 test.name, test.exp, test.got) 16 } 17 } 18 }