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
Error suppression #41749
Comments
@w3bservice you can write something like this: package main
import (
"fmt"
"os"
)
func main() {
fmt.Printf("exit status 0")
os.Exit(0)
} |
panic: runtime error: invalid memory address or nil pointer dereference goroutine 1 [running]: package main |
Hi, the Go project does not use its bug tracker for general discussion or asking questions about the language. The Github bug tracker is only used for tracking bugs and proposals going through the Proposal Process. Please see the Questions wiki page; it has a list of good places for asking questions. Thanks! Closing here, since this is not a bug. |
Hello,
how to suppress the error output and output an "exit status 0"?
im new on golang...
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I am working on a solution to monitor our backups, with Duplicati, via Grafana. Duplicate sends a mail to a pushgateway after the backup is done. With the script below it works so far. If the pushgateway is not reachable, the script aborts with an "exit status 2". This will provoke an error message in Duplicati as a warning. The script should also terminate with an "exit status 0" in case of an error.
How can this be realized?
I hope you can help me
The text was updated successfully, but these errors were encountered: