isScalarKind reports whether k is a protobuf scalar kind (except bytes). This function exists for historical reasons since the representation of scalars differs between v1 and v2, where v1 uses *T and v2 uses T.
(k reflect.Kind)
| 324 | // This function exists for historical reasons since the representation of |
| 325 | // scalars differs between v1 and v2, where v1 uses *T and v2 uses T. |
| 326 | func isScalarKind(k reflect.Kind) bool { |
| 327 | switch k { |
| 328 | case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String: |
| 329 | return true |
| 330 | default: |
| 331 | return false |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | // clearUnknown removes unknown fields from m where remover.Has reports true. |
| 336 | func clearUnknown(m protoreflect.Message, remover interface { |
no outgoing calls
no test coverage detected