This page gives some hints on how to successfully ask for help in the various Go support forums.
Before asking for help, please check that you've addressed the following common issues:
Always check all errors. It is common to see problems reported related to nil panics due to code like this
result, err := somefunction() if err != nil { log.Println("oops an error happened", err) // return is missing here } // the code then continues to use result which is invalid.
or
result, _ := somefunction() // code uses result which might be invalid
You should make sure it is clear that your code is correctly handling all error conditions before asking for help.
Further reading:
Unexpected runtime panics are often caused by data races in your program. If your program contains a data race you need to address the race before asking for help.
If your program has good test coverage you can test for races by adding the -race
flag to your go test
invocation.
If your program does not have good test coverage or the crash only happens when running the program, you can build a race enabled version of your program by passing -race
to your go build
or go install
invocation.
The behaviour of a Go program with a data race is undefined. There are no safe data races in Go programs.
Further reading:
The best way to get help is to show