On Mon, Mar 15, 2021 at 1:49 PM cpu...@gmail.com <cpui...@gmail.com> wrote:
> type WrappedToken Token Note that this is not a type alias. WrappedToken is a new type. Even if its underlying type is Token, WrappedToken does not automatically have any methods of Token. > Only to find out, that unmarshaling a WrappedToken does not call > Token.UnmarshalJSON which came as a bit of surprise. To be less surprised, check the language specs that say this is how the type system works. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-XRj3sRkZdEoAPVu4VnLnSvtEzvV8hiUUvOpoUjFzPuEw%40mail.gmail.com.