Beispiel #1
0
func TestParseTags(t *testing.T) {
	for _, test := range parseTagsTests {
		actual, _ := strings.ParseTags(test.input)
		if !listEquals(actual, test.expected) {
			t.Errorf("expecting ParseTags(%v) to be %v, got %v", test.input, test.expected, actual)
		}
	}
}
Beispiel #2
0
func (f Form) ParseTags(field string) ([]string, error) {
	tags := f.GetOne(field)
	return strings.ParseTags(tags)
}