Is this bug in main.go?

in “main.go”,code below:

	protocol.PingTimeout = time.Duration(opts.PingTimeoutS) * time.Second
	protocol.PingIdleTime = time.Duration(opts.PingIdleTimeS) * time.Second

error : Description Resource Path Location Type undefined: protocol.PingTimeout main.go /MyGoDemo/src/syncthing/cmd/syncthing line 571 Go Problem

this error show in Eclipse

You’re building code that is out of sync with reality somehow. Can you describe what you’re doing and with what version of the code?

hi Borg: I use the sycnthing “syncthing-source-v0.11.26”! I fix all the syncthing’s depend package,but at last ,those code show error,when i comment those code ,i can build the syncthing in Eclipse and debug it ,then i think those code may be bug!!

If you build using syncthings provides build script. In the root of the repo run go run build.go and I think it will build fine.

All dependencies and their right versions are in the Godeps directory, so you need to make sure that your system libraries are at the same version as the ones in Godeps directory, or do godep restore if you have Godep installed.

Also you might want to do a go run build.go clean

sorry everybody: This isn’t bug , is my mistake,i have success build、debug the syncthing in the Eclipse!! now i didn’t know why cause that question , if i know i will post the reason !!

1 Like