Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一个package下有两个main #7

Closed
fengxu11 opened this issue May 20, 2018 · 2 comments
Closed

一个package下有两个main #7

fengxu11 opened this issue May 20, 2018 · 2 comments

Comments

@fengxu11
Copy link

你的仓库中 根目录下 main.go 和 cron.go 中都有main入口,导致 go get时 报错

github.com/EDDYCJY/go-gin-example

go/src/github.com/EDDYCJY/go-gin-example/main.go:21:6: main redeclared in this block
previous declaration at go/src/github.com/EDDYCJY/go-gin-example/cron.go:12:6
go/src/github.com/EDDYCJY/go-gin-example/main.go:28:23: main.func1 redeclared in this block
previous declaration at go/src/github.com/EDDYCJY/go-gin-example/cron.go:16:27

@eddycjy
Copy link
Owner

eddycjy commented May 20, 2018

想着做为案例误传上去了,我现在清理一下
感谢反馈

@eddycjy
Copy link
Owner

eddycjy commented May 20, 2018

已解决完毕(cron 在实际使用时在其他地方启动即可)

cron.go 的代码参考 https://segmentfault.com/a/1190000014666453 为准

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants