最近在 review 一些代碼中,發現經常某個類型定義的方法,其接收者既有值類型,又有指針類型,然後 Goland 就有提示: Struct Person has methods on both value and pointer receivers. Such usage is not recommended by the Go Documentation.一般來講,這個提示對代碼的運行並不會 ⌘ Read more
最近在 review 一些代碼中,發現經常某個類型定義的方法,其接收者既有值類型,又有指針類型,然後 Goland 就有提示: Struct Person has methods on both value and pointer receivers. Such usage is not recommended by the Go Documentation.一般來講,這個提示對代碼的運行並不會 ⌘ Read more