2024年7月14日
摘要: 方法的接收器 —— 对象接收器与指针接收器 对象接收器不会更新属性 package tests import ( "fmt" "testing" ) type Consumer struct { Balance int64 } // 对象接收器 func (c Consumer) add(v int 阅读全文
posted @ 2024-07-14 09:04 江湖乄夜雨 阅读(7) 评论(0) 推荐(0) 编辑