Go Error Tracking
DebugMate helps track typical Go application errors, making error monitoring easier in a Go environment.
Go 1.23.1 Errors
Division by Zero: Division with zero as the divisor.
File Not Found: Missing file in file-related operations.
HTTP Errors (400+ Codes): Tracks HTTP requests with client/server errors.
Simple Panic: Standard Go panics.
Type Assertion: Issues with type assertions in code.
Installation Process
To use the debugmate
package in your Go project, follow these steps:
Add the package to your project:
Run the following command to install the package:
bashgo get github.com/DebugMate/go
Update your dependencies:
After installing the package, run go mod tidy to ensure your go.mod file is properly updated:
bashgo mod tidy
Usage
Once the package is installed, you can start using it in your project. Here's an example of how to set it up and catch errors:
package main
import (
"github.com/DebugMate/go/debugmate"
"errors"
)
func main() {
debugmate.Init(debugmate.Options{
Domain: "http://your-domain.com",
Token: "your-token",
Enabled: true,
})
debugmate.Catch(errors.New("Test generated by the debugmate test command"))
}