gpt4 book ai didi

reflection - 去吧,为什么不应该使用 "this"作为方法接收者名称

转载 作者:IT王子 更新时间:2023-10-29 00:53:46 26 4
gpt4 key购买 nike

<分区>

我使用 VS Code Go 扩展。

这是我的代码

func (this *MyClass) Xxx() error {}

它提到了我

exported method MyClass.Xxx should have comment or be unexported

receiver name should be a reflection of its identity; don't use generic names such as "me", "this", or "self";

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com