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

add notice for users don't printf in func init() #30

Closed
guhan121 opened this issue Mar 22, 2019 · 3 comments
Closed

add notice for users don't printf in func init() #30

guhan121 opened this issue Mar 22, 2019 · 3 comments

Comments

@guhan121
Copy link

if use a printf in func init(){}

This may cause the upgrade check to fail!

user will got sanity check failed

eg:
add

func init() {
	fmt.Println("hahhahahhahahahaaha")
}

to github.com/jpillora/overseer/example/main.go

bogon:example qiantao$ ./example.sh 
BUILT APP (1)
RUNNING APP
hahhahahhahahahaaha
2019/03/22 17:22:13 [overseer master] run
2019/03/22 17:22:13 [overseer master] setupSignalling
2019/03/22 17:22:13 [overseer master] checking for updates...
2019/03/22 17:22:13 [overseer master] no updates
2019/03/22 17:22:13 [overseer master] starting /Users/qiantao/work/GoTestSrc/src/github.com/jpillora/overseer/example/my_app
hahhahahhahahahaaha
2019/03/22 17:22:13 [overseer slave#1] run
2019/03/22 17:22:13 [overseer slave#1] slave wait sp.Config.RestartSignal
2019/03/22 17:22:13 [overseer slave#1] start program
app#1 start
app#1 BuildDate=20190322_172211
app#1 (45fb899a1abd7bd65c698fbcbc6525bade97932f) listening...
app#1 (45fb899a1abd7bd65c698fbcbc6525bade97932f) says hello (d=0)
app#1 work
app#1 (45fb899a1abd7bd65c698fbcbc6525bade97932f) says hello (d=0)
app#1 work
BUILT APP (2)
2019/03/22 17:22:18 [overseer master] streaming update...
2019/03/22 17:22:18 [overseer master] sanity check failed
2019/03/22 17:22:18 [overseer master] checking for updates...
app#1 work
app#1 (45fb899a1abd7bd65c698fbcbc6525bade97932f) says hello (d=0)
2019/03/22 17:22:19 [overseer master] no updates
app#1 (45fb899a1abd7bd65c698fbcbc6525bade97932f) says hello (d=0)
app#1 work
app#1 (45fb899a1abd7bd65c698fbcbc6525bade97932f) says hello (d=5000000000)
BUILT APP (3)
app#1 work
2019/03/22 17:22:23 [overseer master] streaming update...
2019/03/22 17:22:23 [overseer master] sanity check failed
2019/03/22 17:22:23 [overseer master] checking for updates...
2019/03/22 17:22:24 [overseer master] no updates
app#1 (45fb899a1abd7bd65c698fbcbc6525bade97932f) says hello (d=0)
app#1 work
app#1 (45fb899a1abd7bd65c698fbcbc6525bade97932f) says hello (d=0)
app#1 (45fb899a1abd7bd65c698fbcbc6525bade97932f) says hello (d=5000000000)
app#1 (45fb899a1abd7bd65c698fbcbc6525bade97932f) says hello (d=0)
app#1 work
2019/03/22 17:22:27 [overseer master] proxy signal (terminated)
2019/03/22 17:22:27 [overseer master] prog exited with -1

@jpillora
Copy link
Owner

jpillora commented Mar 22, 2019 via email

@wgjtyu
Copy link

wgjtyu commented Oct 1, 2020

always got "sanity check failed" before remove fmt.Printf in the Init func.
thanks, guhan121

@yangyuan6
Copy link

yangyuan6 commented Sep 8, 2021

always got "sanity check failed" before remove fmt.Printf in the Init func.
thanks, guhan121

I fixed it.
see mr

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

No branches or pull requests

4 participants