{"id":21951880,"url":"https://github.com/go-coldbrew/errors","last_synced_at":"2026-04-03T00:01:38.350Z","repository":{"id":51581268,"uuid":"328138671","full_name":"go-coldbrew/errors","owner":"go-coldbrew","description":"Enhanced Go errors with stack traces, gRPC status codes, and async error notification (Sentry/Rollbar/Airbrake)","archived":false,"fork":false,"pushed_at":"2026-03-28T09:11:54.000Z","size":396,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T09:37:29.464Z","etag":null,"topics":["coldbrew","error-handling","errors","go","golang","grpc","sentry","stack-trace","stacktrace"],"latest_commit_sha":null,"homepage":"https://docs.coldbrew.cloud","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-coldbrew.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-09T11:23:56.000Z","updated_at":"2026-03-28T09:06:11.000Z","dependencies_parsed_at":"2025-03-08T01:01:29.713Z","dependency_job_id":"932e36ad-76ac-4341-82f0-bc0317c20c80","html_url":"https://github.com/go-coldbrew/errors","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/go-coldbrew/errors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-coldbrew%2Ferrors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-coldbrew%2Ferrors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-coldbrew%2Ferrors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-coldbrew%2Ferrors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-coldbrew","download_url":"https://codeload.github.com/go-coldbrew/errors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-coldbrew%2Ferrors/sbom","scorecard":{"id":431546,"data":{"date":"2025-08-11","repo":{"name":"github.com/go-coldbrew/errors","commit":"6744562fbd8e27c88cd8a19b764c952ae7f42dfd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/go-coldbrew/errors/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/go-coldbrew/errors/go.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T03:28:03.808Z","repository_id":51581268,"created_at":"2025-08-19T03:28:03.808Z","updated_at":"2025-08-19T03:28:03.808Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31319740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T23:57:25.032Z","status":"ssl_error","status_checked_at":"2026-04-02T23:57:06.281Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coldbrew","error-handling","errors","go","golang","grpc","sentry","stack-trace","stacktrace"],"created_at":"2024-11-29T06:18:01.812Z","updated_at":"2026-04-03T00:01:38.341Z","avatar_url":"https://github.com/go-coldbrew.png","language":"Go","readme":"\u003c!-- Code generated by gomarkdoc. DO NOT EDIT --\u003e\n\n[![CI](https://github.com/go-coldbrew/errors/actions/workflows/go.yml/badge.svg)](https://github.com/go-coldbrew/errors/actions/workflows/go.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-coldbrew/errors)](https://goreportcard.com/report/github.com/go-coldbrew/errors)\n[![GoDoc](https://pkg.go.dev/badge/github.com/go-coldbrew/errors.svg)](https://pkg.go.dev/github.com/go-coldbrew/errors)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\n\n# errors\n\n```go\nimport \"github.com/go-coldbrew/errors\"\n```\n\nPackage errors provides an implementation of golang error with stack strace information attached to it, the error objects created by this package are compatible with https://golang.org/pkg/errors/\n\nHow To Use The simplest way to use this package is by calling one of the two functions\n\n```\nerrors.New(...)\nerrors.Wrap(...)\n```\n\nYou can also initialize custom error stack by using one of the \\`WithSkip\\` functions. \\`WithSkip\\` allows skipping the defined number of functions from the stack information.\n\n```\nif you want to create a new error use New\nif you want to skip some functions on the stack use NewWithSkip\nif you want to add GRPC status use NewWithStatus\nif you want to skip some functions on the stack and add GRPC status use NewWithSkipAndStatus\nif you want to wrap an existing error use Wrap\nif you want to wrap an existing error and add GRPC status use WrapWithStatus\nif you want to wrap an existing error and skip some functions on the stack use WrapWithSkip\nif you want to wrap an existing error, skip some functions on the stack and add GRPC status use WrapWithSkipAndStatus\nif you want to wrap an existing error and add notifier options use WrapWithNotifier\nif you want to wrap an existing error, skip some functions on the stack and add notifier options use WrapWithSkipAndNotifier\n```\n\nHead to https://docs.coldbrew.cloud for more information.\n\n\u003cdetails\u003e\u003csummary\u003eExample (Cause)\u003c/summary\u003e\n\u003cp\u003e\n\nCause returns the root cause of a wrapped error chain.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/go-coldbrew/errors\"\n)\n\nfunc main() {\n\troot := io.EOF\n\tfirst := errors.Wrap(root, \"read body\")\n\tsecond := errors.Wrap(first, \"handle request\")\n\n\tfmt.Println(\"error:\", second)\n\tfmt.Println(\"cause:\", second.Cause())\n}\n```\n\n#### Output\n\n```\nerror: handle request: read body: EOF\ncause: EOF\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eExample (Stack Frame)\u003c/summary\u003e\n\u003cp\u003e\n\n\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/go-coldbrew/errors\"\n)\n\nfunc main() {\n\terr := errors.New(\"something failed\")\n\tframes := err.StackFrame()\n\t// Stack frames are captured automatically\n\tfmt.Println(len(frames) \u003e 0)\n}\n```\n\n#### Output\n\n```\ntrue\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## Index\n\n- [Constants](\u003c#constants\u003e)\n- [func SetBaseFilePath\\(path string\\)](\u003c#SetBaseFilePath\u003e)\n- [func SetMaxStackDepth\\(n int\\)](\u003c#SetMaxStackDepth\u003e)\n- [type ErrorExt](\u003c#ErrorExt\u003e)\n  - [func New\\(msg string\\) ErrorExt](\u003c#New\u003e)\n  - [func NewWithSkip\\(msg string, skip int\\) ErrorExt](\u003c#NewWithSkip\u003e)\n  - [func NewWithSkipAndStatus\\(msg string, skip int, status \\*grpcstatus.Status\\) ErrorExt](\u003c#NewWithSkipAndStatus\u003e)\n  - [func NewWithStatus\\(msg string, status \\*grpcstatus.Status\\) ErrorExt](\u003c#NewWithStatus\u003e)\n  - [func Newf\\(format string, args ...any\\) ErrorExt](\u003c#Newf\u003e)\n  - [func Wrap\\(err error, msg string\\) ErrorExt](\u003c#Wrap\u003e)\n  - [func WrapWithSkip\\(err error, msg string, skip int\\) ErrorExt](\u003c#WrapWithSkip\u003e)\n  - [func WrapWithSkipAndStatus\\(err error, msg string, skip int, status \\*grpcstatus.Status\\) ErrorExt](\u003c#WrapWithSkipAndStatus\u003e)\n  - [func WrapWithStatus\\(err error, msg string, status \\*grpcstatus.Status\\) ErrorExt](\u003c#WrapWithStatus\u003e)\n  - [func Wrapf\\(err error, format string, args ...any\\) ErrorExt](\u003c#Wrapf\u003e)\n- [type NotifyExt](\u003c#NotifyExt\u003e)\n- [type StackFrame](\u003c#StackFrame\u003e)\n\n\n## Constants\n\n\u003ca name=\"SupportPackageIsVersion1\"\u003e\u003c/a\u003eSupportPackageIsVersion1 is a compile\\-time assertion constant. Downstream packages reference this to enforce version compatibility.\n\n```go\nconst SupportPackageIsVersion1 = true\n```\n\n\u003ca name=\"SetBaseFilePath\"\u003e\u003c/a\u003e\n## func [SetBaseFilePath](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L281\u003e)\n\n```go\nfunc SetBaseFilePath(path string)\n```\n\nSetBaseFilePath sets the base file path for linking source code with reported stack information\n\n\u003ca name=\"SetMaxStackDepth\"\u003e\u003c/a\u003e\n## func [SetMaxStackDepth](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L264\u003e)\n\n```go\nfunc SetMaxStackDepth(n int)\n```\n\nSetMaxStackDepth sets the maximum number of stack frames captured when creating errors. Accepts values in \\[1, 256\\]; out\\-of\\-range values are ignored. Default is 16. Safe for concurrent use.\n\n\u003ca name=\"ErrorExt\"\u003e\u003c/a\u003e\n## type [ErrorExt](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L34-L45\u003e)\n\nErrorExt is the interface that defines a error, any ErrorExt implementors can use and override errors and notifier package\n\n```go\ntype ErrorExt interface {\n\n    // Callers returns the call poiners for the stack\n    Callers() []uintptr\n    // StackFrame returns the stack frame for the error\n    StackFrame() []StackFrame\n    //Cause returns the original error object that caused this error\n    Cause() error\n    //GRPCStatus allows ErrorExt to be treated as a GRPC Error\n    GRPCStatus() *grpcstatus.Status\n    // contains filtered or unexported methods\n}\n```\n\n\u003ca name=\"New\"\u003e\u003c/a\u003e\n### func [New](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L180\u003e)\n\n```go\nfunc New(msg string) ErrorExt\n```\n\nNew creates a new error with stack information\n\n\u003cdetails\u003e\u003csummary\u003eExample\u003c/summary\u003e\n\u003cp\u003e\n\n\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/go-coldbrew/errors\"\n)\n\nfunc main() {\n\terr := errors.New(\"something went wrong\")\n\tfmt.Println(err)\n}\n```\n\n#### Output\n\n```\nsomething went wrong\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003ca name=\"NewWithSkip\"\u003e\u003c/a\u003e\n### func [NewWithSkip](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L190\u003e)\n\n```go\nfunc NewWithSkip(msg string, skip int) ErrorExt\n```\n\nNewWithSkip creates a new error skipping the number of function on the stack\n\n\u003ca name=\"NewWithSkipAndStatus\"\u003e\u003c/a\u003e\n### func [NewWithSkipAndStatus](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L195\u003e)\n\n```go\nfunc NewWithSkipAndStatus(msg string, skip int, status *grpcstatus.Status) ErrorExt\n```\n\nNewWithSkipAndStatus creates a new error skipping the number of function on the stack and GRPC status\n\n\u003ca name=\"NewWithStatus\"\u003e\u003c/a\u003e\n### func [NewWithStatus](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L185\u003e)\n\n```go\nfunc NewWithStatus(msg string, status *grpcstatus.Status) ErrorExt\n```\n\nNewWithStatus creates a new error with statck information and GRPC status\n\n\u003ca name=\"Newf\"\u003e\u003c/a\u003e\n### func [Newf](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L271\u003e)\n\n```go\nfunc Newf(format string, args ...any) ErrorExt\n```\n\nNewf creates a new error with a formatted message and stack information\n\n\u003cdetails\u003e\u003csummary\u003eExample\u003c/summary\u003e\n\u003cp\u003e\n\n\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/go-coldbrew/errors\"\n)\n\nfunc main() {\n\terr := errors.Newf(\"user %s not found\", \"alice\")\n\tfmt.Println(err)\n}\n```\n\n#### Output\n\n```\nuser alice not found\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003ca name=\"Wrap\"\u003e\u003c/a\u003e\n### func [Wrap](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L200\u003e)\n\n```go\nfunc Wrap(err error, msg string) ErrorExt\n```\n\nWrap wraps an existing error and appends stack information if it does not exists\n\n\u003cdetails\u003e\u003csummary\u003eExample\u003c/summary\u003e\n\u003cp\u003e\n\n\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/go-coldbrew/errors\"\n)\n\nfunc main() {\n\toriginal := io.EOF\n\twrapped := errors.Wrap(original, \"failed to read config\")\n\tfmt.Println(wrapped)\n\tfmt.Println(\"cause:\", wrapped.Cause())\n}\n```\n\n#### Output\n\n```\nfailed to read config: EOF\ncause: EOF\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eExample (Errors Is)\u003c/summary\u003e\n\u003cp\u003e\n\nWrapped errors are compatible with stdlib errors.Is for unwrapping.\n\n```go\npackage main\n\nimport (\n\tstderrors \"errors\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/go-coldbrew/errors\"\n)\n\nfunc main() {\n\toriginal := io.EOF\n\twrapped := errors.Wrap(original, \"read failed\")\n\tfmt.Println(stderrors.Is(wrapped, io.EOF))\n}\n```\n\n#### Output\n\n```\ntrue\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003ca name=\"WrapWithSkip\"\u003e\u003c/a\u003e\n### func [WrapWithSkip](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L210\u003e)\n\n```go\nfunc WrapWithSkip(err error, msg string, skip int) ErrorExt\n```\n\nWrapWithSkip wraps an existing error and appends stack information if it does not exists skipping the number of function on the stack\n\n\u003ca name=\"WrapWithSkipAndStatus\"\u003e\u003c/a\u003e\n### func [WrapWithSkipAndStatus](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L215\u003e)\n\n```go\nfunc WrapWithSkipAndStatus(err error, msg string, skip int, status *grpcstatus.Status) ErrorExt\n```\n\nWrapWithSkip wraps an existing error and appends stack information if it does not exists skipping the number of function on the stack along with GRPC status\n\n\u003ca name=\"WrapWithStatus\"\u003e\u003c/a\u003e\n### func [WrapWithStatus](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L205\u003e)\n\n```go\nfunc WrapWithStatus(err error, msg string, status *grpcstatus.Status) ErrorExt\n```\n\nWrap wraps an existing error and appends stack information if it does not exists along with GRPC status\n\n\u003cdetails\u003e\u003csummary\u003eExample\u003c/summary\u003e\n\u003cp\u003e\n\nWrapWithStatus attaches a gRPC status code to a wrapped error.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/go-coldbrew/errors\"\n\t\"google.golang.org/grpc/codes\"\n\t\"google.golang.org/grpc/status\"\n)\n\nfunc main() {\n\toriginal := fmt.Errorf(\"record not found\")\n\ts := status.New(codes.NotFound, \"user not found\")\n\twrapped := errors.WrapWithStatus(original, \"lookup failed\", s)\n\n\tfmt.Println(wrapped)\n\tfmt.Println(\"gRPC code:\", wrapped.GRPCStatus().Code())\n}\n```\n\n#### Output\n\n```\nlookup failed: record not found\ngRPC code: NotFound\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003ca name=\"Wrapf\"\u003e\u003c/a\u003e\n### func [Wrapf](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L276\u003e)\n\n```go\nfunc Wrapf(err error, format string, args ...any) ErrorExt\n```\n\nWrapf wraps an existing error with a formatted message and appends stack information if it does not exist\n\n\u003cdetails\u003e\u003csummary\u003eExample\u003c/summary\u003e\n\u003cp\u003e\n\n\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/go-coldbrew/errors\"\n)\n\nfunc main() {\n\terr := fmt.Errorf(\"connection refused\")\n\twrapped := errors.Wrapf(err, \"failed to connect to port %d\", 5432)\n\tfmt.Println(wrapped)\n}\n```\n\n#### Output\n\n```\nfailed to connect to port 5432: connection refused\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003ca name=\"NotifyExt\"\u003e\u003c/a\u003e\n## type [NotifyExt](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L48-L53\u003e)\n\nNotifyExt is the interface definition for notifier related options\n\n```go\ntype NotifyExt interface {\n    // ShouldNotify returns true if the error should be notified\n    ShouldNotify() bool\n    // Notified sets the error to be notified or not\n    Notified(status bool)\n}\n```\n\n\u003ca name=\"StackFrame\"\u003e\u003c/a\u003e\n## type [StackFrame](\u003chttps://github.com/go-coldbrew/errors/blob/main/errors.go#L27-L31\u003e)\n\nStackFrame represents the stackframe for tracing exception\n\n```go\ntype StackFrame struct {\n    File string `json:\"file\"`\n    Line int    `json:\"line\"`\n    Func string `json:\"function\"`\n}\n```\n\nGenerated by [gomarkdoc](\u003chttps://github.com/princjef/gomarkdoc\u003e)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-coldbrew%2Ferrors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-coldbrew%2Ferrors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-coldbrew%2Ferrors/lists"}