isModuleMapType returns true if the type is map[string]json.RawMessage. It assumes that the string key is the module name, but this is not always the case. To know for sure, this function must return true, but also the struct tag where this type appears must NOT define an inline_key attribute, which
(typ reflect.Type)
| 363 | // attribute, which would mean that the module names appear inline with the |
| 364 | // values, not in the key. |
| 365 | func isModuleMapType(typ reflect.Type) bool { |
| 366 | return typ.Kind() == reflect.Map && |
| 367 | typ.Key().Kind() == reflect.String && |
| 368 | isJSONRawMessage(typ.Elem()) |
| 369 | } |
| 370 | |
| 371 | // ProxyFuncProducer is implemented by modules which produce a |
| 372 | // function that returns a URL to use as network proxy. Modules |
no test coverage detected