EncodeValues using key name of the form "{key}.N" where N increments with each value. A value of "err" will return an error.
(key string, v *url.Values)
| 437 | // EncodeValues using key name of the form "{key}.N" where N increments with |
| 438 | // each value. A value of "err" will return an error. |
| 439 | func (m customEncodedStrings) EncodeValues(key string, v *url.Values) error { |
| 440 | for i, arg := range m { |
| 441 | if arg == "err" { |
| 442 | return errors.New("encoding error") |
| 443 | } |
| 444 | v.Set(fmt.Sprintf("%s.%d", key, i), arg) |
| 445 | } |
| 446 | return nil |
| 447 | } |
| 448 | |
| 449 | func TestValues_CustomEncodingSlice(t *testing.T) { |
| 450 | tests := []struct { |
nothing calls this directly
no outgoing calls
no test coverage detected