摘要: go接收者和锁注意事项 如果需要修改对象中的值,建议使用指针接收者。如果不需要修改对象中的值,建议使用值接收者。 代码 package main import ( "fmt" ) type Student struct { Name string Age int } func (s Student) 阅读全文
posted @ 2021-08-07 16:44 Myuniverse 阅读(50) 评论(0) 推荐(0) 编辑