Merr
wrap golang error to make it easy to debug
Install / Use
/learn @mozhata/MerrREADME
merr
wrap golang error to make it easy to debug
usage
package main
import (
"errors"
"fmt"
"github.com/mozhata/merr"
)
func main() {
var err error
err = warpper()
logMerr(err)
}
func warpper() error {
err := errors.New("origin err")
return merr.WrapErr(err, "new err")
}
func logMerr(err error) {
e := merr.WrapErr(err)
fmt.Printf("E%d: err: %s\nraw err: %s\ncall stack: %s\n",
e.Code,
e.Error(),
e.RawErr(),
e.CallStack(),
)
}
output:
E500: err: new err
raw err: origin err
call stack: main.warpper
practice/go/example/main.go:18
main.main
practice/go/example/main.go:12
runtime.main
runtime/proc.go:183
runtime.goexit
runtime/asm_amd64.s:2086
Related Skills
node-connect
341.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
341.0kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
84.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
