func TestParseBool(t *testing.T) { for _, test := range parseBoolTests { actual, _ := strings.ParseBool(test.input) if actual != test.expected { t.Errorf("expecting ParseBool(%v) to be %v, got %v", test.input, test.expected, actual) } } }
func (f Form) ParseBool(field string) (bool, error) { val := f.GetOne(field) return strings.ParseBool(val) }