(keyPrefix string, key interface{})
| 98 | } |
| 99 | |
| 100 | func formatInvalidKeyError(keyPrefix string, key interface{}) error { |
| 101 | var location string |
| 102 | if keyPrefix == "" { |
| 103 | location = "at top level" |
| 104 | } else { |
| 105 | location = fmt.Sprintf("in %s", keyPrefix) |
| 106 | } |
| 107 | return errors.Errorf("non-string key %s: %#v", location, key) |
| 108 | } |
no outgoing calls
no test coverage detected