Capture production errors automatically in your Go applications. Fast, concurrent, and lightweight.
go get github.com/MasonBachmann7/Bugstack-Go
package main
import (
"log"
"net/http"
"os"
bugstack "github.com/MasonBachmann7/Bugstack-Go"
)
func main() {
// Initialize bugstack
bugstack.Init(bugstack.Config{
APIKey: os.Getenv("BUGSTACK_API_KEY"),
})
defer bugstack.Flush()
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello World"))
})
// bugstack automatically captures panics and errors
log.Fatal(http.ListenAndServe(":8080", nil))
}
View the full source code, report issues, and contribute on GitHub.