var jsonMarshalerV1Type … var jsonMarshalerV2Type … var jsonUnmarshalerV1Type … var jsonUnmarshalerV2Type … var textMarshalerType … var textUnmarshalerType … type MarshalerV1 … type MarshalerV2 … type UnmarshalerV1 … type UnmarshalerV2 … func makeMethodArshaler(fncs *arshaler, t reflect.Type) *arshaler { … } // implementsWhich is like t.Implements(ifaceType) for a list of interfaces, // but checks whether either t or reflect.PointerTo(t) implements the interface. // It returns the first interface type that matches and whether a value of t // needs to be addressed first before it implements the interface. func implementsWhich(t reflect.Type, ifaceTypes ...reflect.Type) (which reflect.Type, needAddr bool) { … } // addrWhen returns va.Addr if addr is specified, otherwise it returns itself. func (va addressableValue) addrWhen(addr bool) reflect.Value { … }