{"id":19681302,"url":"https://github.com/reconquest/karma-go","last_synced_at":"2025-04-29T04:32:01.145Z","repository":{"id":57488520,"uuid":"103576796","full_name":"reconquest/karma-go","owner":"reconquest","description":"Everything has a reason.","archived":false,"fork":false,"pushed_at":"2024-08-08T10:47:41.000Z","size":48,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-08T12:56:07.627Z","etag":null,"topics":["context","err","errors","golang","logging","tags"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reconquest.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}},"created_at":"2017-09-14T20:09:48.000Z","updated_at":"2024-08-08T10:47:43.000Z","dependencies_parsed_at":"2024-06-18T21:14:15.282Z","dependency_job_id":"5663aefe-f630-4bd9-af0d-4cd3f655fe70","html_url":"https://github.com/reconquest/karma-go","commit_stats":{"total_commits":40,"total_committers":3,"mean_commits":"13.333333333333334","dds":"0.44999999999999996","last_synced_commit":"c317920417aece1f734d305be08bdd4116066c07"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconquest%2Fkarma-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconquest%2Fkarma-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconquest%2Fkarma-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reconquest%2Fkarma-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reconquest","download_url":"https://codeload.github.com/reconquest/karma-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224151601,"owners_count":17264436,"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","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":["context","err","errors","golang","logging","tags"],"created_at":"2024-11-11T18:07:29.212Z","updated_at":"2024-11-11T18:07:29.896Z","avatar_url":"https://github.com/reconquest.png","language":"Go","readme":"# Contexts\n\nkarma has contexts support, which allows to add arbitrary key-value fields\nto the error to ease debug.\n\nSimplest usage is to add key-values for existing error:\n\n```go\nfunc bar(arg string) error {\n    return fmt.Errorf(\"arg is invalid: %s\", arg)\n}\n\nfunc foo(arg string) error {\n    err := bar(arg)\n    if err != nil {\n        return karma.Describe(\"method\", \"bar\").Reason(err)\n    }\n}\n\nfmt.Println(foo(\"hello\"))\n\n// Output:\n//\n// arg is invalid: hello\n// └─ method: bar\n```\n\n# Comparison\n\n| Feature                  | [karma][1] | [errors][2] | [emperror][3] |\n| --                       | --         | --          | --            |\n| Nested Errors            | ✔          | ✔           | ✔             |\n| Key-Value Context        | ✔          |             | ~             |\n| Descriptive Pretty Print | ✔          |             |               |\n| Embedded Stack Trace     |            | ✔           | ✔             |\n| JSON Friendly            | ✔          |             |               |\n| Multi-error Support      | ✔          |             | ~             |\n| Fluid Interface          | ✔          |             |               |\n\n# License\n\nThis project is licensed under the terms of the MIT license.\n\n[1]: https://github.com/reconquest/karma-go\n[2]: https://godoc.org/github.com/pkg/errors\n[3]: https://github.com/goph/emperror\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freconquest%2Fkarma-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freconquest%2Fkarma-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freconquest%2Fkarma-go/lists"}