Too Long; Didn't Read
Today’s bug and a lesson to be learned is about non/pointer receiver function. It happens when I’m doing custom marshal JSON for my struct. In my custom MarshalJSON I make the receiver is a pointer. So my custom marshall won’t called if I try to marshal a non-pointer object. But, if I marshal. a non.pointer object, it will. succeed to. marshal the. Object. It also vise versa for non. pointer (value) receiver in function.