{"id":22409790,"url":"https://github.com/go-faster/errors","last_synced_at":"2025-09-07T00:41:30.725Z","repository":{"id":39583787,"uuid":"424117124","full_name":"go-faster/errors","owner":"go-faster","description":"clear go error wrapping with caller","archived":false,"fork":false,"pushed_at":"2023-12-13T12:05:40.000Z","size":146,"stargazers_count":51,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-25T18:06:44.785Z","etag":null,"topics":["error-handling","errors","faster","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-faster.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}},"created_at":"2021-11-03T06:40:13.000Z","updated_at":"2025-05-21T14:07:11.000Z","dependencies_parsed_at":"2023-07-12T14:53:06.453Z","dependency_job_id":"9328ee52-cb89-4101-85b0-960996c4e613","html_url":"https://github.com/go-faster/errors","commit_stats":{"total_commits":93,"total_committers":10,"mean_commits":9.3,"dds":0.4086021505376344,"last_synced_commit":"ff8939fc58e02659ec8c1f7fab7150f4675344b5"},"previous_names":["ogen-go/errors"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/go-faster/errors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-faster%2Ferrors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-faster%2Ferrors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-faster%2Ferrors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-faster%2Ferrors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-faster","download_url":"https://codeload.github.com/go-faster/errors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-faster%2Ferrors/sbom","scorecard":{"id":431742,"data":{"date":"2025-08-11","repo":{"name":"github.com/go-faster/errors","commit":"a3f192e8d7ff4970217f4934b6a418c828ad8774"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Code-Review","score":5,"reason":"Found 5/9 approved changesets -- score normalized to 5","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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pkg.yml:1","Warn: no topLevel permission defined: .github/workflows/x.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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/pkg.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/go-faster/errors/pkg.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/x.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/go-faster/errors/x.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/x.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/go-faster/errors/x.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/x.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/go-faster/errors/x.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/x.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/go-faster/errors/x.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/x.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/go-faster/errors/x.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/x.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/go-faster/errors/x.yml/main?enable=pin","Info:   0 out of   7 third-party 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":"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: BSD 3-Clause \"New\" or \"Revised\" License: 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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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":"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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 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"}}]},"last_synced_at":"2025-08-19T03:31:20.529Z","repository_id":39583787,"created_at":"2025-08-19T03:31:20.530Z","updated_at":"2025-08-19T03:31:20.530Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273983073,"owners_count":25202092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["error-handling","errors","faster","go","golang"],"created_at":"2024-12-05T12:09:44.422Z","updated_at":"2025-09-07T00:41:30.700Z","avatar_url":"https://github.com/go-faster.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# errors [![Go Reference](https://img.shields.io/badge/go-pkg-00ADD8)](https://pkg.go.dev/github.com/go-faster/errors#section-documentation) [![codecov](https://img.shields.io/codecov/c/github/go-faster/errors?label=cover)](https://codecov.io/gh/go-faster/errors)\n\nFork of [xerrors](https://pkg.go.dev/golang.org/x/xerrors) with explicit [Wrap](https://pkg.go.dev/github.com/go-faster/errors#Wrap) instead of `%w`.\n\n\u003e Clear is better than clever.\n\n```\ngo get github.com/go-faster/errors\n```\n\n```go\nerrors.Wrap(err, \"message\")\n```\n\n## Why\n* Using `Wrap` is the most explicit way to wrap errors\n* Wrapping with `fmt.Errorf(\"foo: %w\", err)` is implicit, redundant and error-prone\n* Parsing `\"foo: %w\"` is implicit, redundant and slow\n* The [pkg/errors](https://github.com/pkg/errors) and [xerrors](https://pkg.go.dev/golang.org/x/xerrors) are not maintainted\n* The [cockroachdb/errors](https://github.com/cockroachdb/errors) is too big\n* The `errors` has no caller stack trace\n\n## Don't need traces?\nCall `errors.DisableTrace` or use build tag `noerrtrace`.\n\n## Additional features\n\n### Into\n\nGeneric type assertion for errors.\n\n```go\n// Into finds the first error in err's chain that matches target type T, and if so, returns it.\n//\n// Into is type-safe alternative to As.\nfunc Into[T error](err error) (val T, ok bool)\n```\n\n```go\nif pathError, ok := errors.Into[*os.PathError](err); ok {\n    fmt.Println(\"Failed at path:\", pathError.Path)\n}\n```\n\n### Must\n\nMust is a generic helper, like template.Must, that wraps a call to a function returning (T, error)\nand panics if the error is non-nil.\n\n```go\nfunc Must[T any](val T, err error) T\n```\n\n## License\n\nBSD-3-Clause, same as Go sources\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-faster%2Ferrors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-faster%2Ferrors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-faster%2Ferrors/lists"}