goc
goc copied to clipboard
Fail to build if main.go declare log
./http_cover_apis_auto_generated.go:11:2: log redeclared in this block previous declaration at ./main.go:8
The log library goc used comes from golang official package: https://golang.org/pkg/log/
, while seems you redeclared it in your main.go:8
can use please share with us why you redeclared it? @jueerwl
开发人员需要打log来输出程序信息,log这个变量也是打日志非常通用的变量名,所以被重复定义的可能性很高哈。在每一个方法都需要同样的log时,说服开发每个方法定义一次,比较困难
fixed by #305