Life is like a Markov chain. It is independent of your past, and only depends on your present.

golang基础问题:X does not implement Y (... method has a point receiver)

遇到问题这个问题的来源是今天在复习接口的时候遇到了一份代码 package main import "fmt" type RPCError struct { Code int64 Message string } func (e *RPCError) Error() string { return fmt.Sprintf("%s, code=%d", e.Message, e.Code) } func main() { fmt.Println("In main function") var rpcErr error = NewRPCError(400, "unknown err") // typecheck1 err
0%