So I have a type String that is an alias of string defined:
type String string
I then apply the following method to it:
func (s String) String() string {
str := "'" + s + "'"
return string(str)
}
I then try to send a struct containing a String over rpc and get the following error:
gob: type not registered for interface: dbUtils.String
I do not define any interfaces with the same name, so why does gob think this is an interface?
I got the same error with a similar type but solved it with gob.Register(otherType{}).
This does not work with String, presumably because string is not an interface. I am somewhat new to go so please explain what is happening.