{"id":22973198,"url":"https://github.com/gabrielhcataldo/go-errors","last_synced_at":"2025-04-02T07:14:45.806Z","repository":{"id":220016859,"uuid":"738907755","full_name":"GabrielHCataldo/go-errors","owner":"GabrielHCataldo","description":"🪳 Lib written in Go, facilitates and improves the visibility of errors that occur in your project, for better bug debugging, we have a robust structure and following the standard error interface, we have message, file, line, stack trace, cause everything for your project.","archived":false,"fork":false,"pushed_at":"2024-05-24T22:48:43.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T21:42:45.738Z","etag":null,"topics":["debug","debugging","error","errors","go-debug","go-error-handler","go-error-handling","go-errors"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/GabrielHCataldo/go-errors/errors","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/GabrielHCataldo.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":"2024-01-04T10:22:54.000Z","updated_at":"2024-05-24T22:44:59.000Z","dependencies_parsed_at":"2024-02-07T21:24:32.790Z","dependency_job_id":"f7881ece-7eb0-4690-b221-6dae007210ed","html_url":"https://github.com/GabrielHCataldo/go-errors","commit_stats":null,"previous_names":["gabrielhcataldo/go-errors","gabrielhcataldo/go-error-detail"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielHCataldo%2Fgo-errors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielHCataldo%2Fgo-errors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielHCataldo%2Fgo-errors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielHCataldo%2Fgo-errors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GabrielHCataldo","download_url":"https://codeload.github.com/GabrielHCataldo/go-errors/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246769968,"owners_count":20830771,"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":["debug","debugging","error","errors","go-debug","go-error-handler","go-error-handling","go-errors"],"created_at":"2024-12-14T23:40:14.909Z","updated_at":"2025-04-02T07:14:45.781Z","avatar_url":"https://github.com/GabrielHCataldo.png","language":"Go","readme":"Go Errors Detail\n=================\n\u003c!--suppress ALL --\u003e\n\u003cimg align=\"right\" src=\"gopher-debug.png\" alt=\"\"\u003e\n\n[![Project status](https://img.shields.io/badge/version-v1.2.1-vividgreen.svg)](https://github.com/GabrielHCataldo/go-errors/releases/tag/v1.2.1)\n[![Go Report Card](https://goreportcard.com/badge/github.com/GabrielHCataldo/go-errors)](https://goreportcard.com/report/github.com/GabrielHCataldo/go-errors)\n[![Coverage Status](https://coveralls.io/repos/GabrielHCataldo/go-errors/badge.svg?branch=main\u0026service=github)](https://coveralls.io/github/GabrielHCataldo/go-errors?branch=main)\n[![Open Source Helpers](https://www.codetriage.com/gabrielhcataldo/go-errors/badges/users.svg)](https://www.codetriage.com/gabrielhcataldo/go-errors)\n[![GoDoc](https://godoc.org/github/GabrielHCataldo/go-errors?status.svg)](https://pkg.go.dev/github.com/GabrielHCataldo/go-errors/errors)\n![License](https://img.shields.io/dub/l/vibe-d.svg)\n\n[//]: # ([![build workflow]\u0026#40;https://github.com/GabrielHCataldo/go-errors/actions/workflows/go.yml/badge.svg\u0026#41;]\u0026#40;https://github.com/GabrielHCataldo/go-errors/actions\u0026#41;)\n\n[//]: # ([![Source graph]\u0026#40;https://sourcegraph.com/github.com/go-errors/errors/-/badge.svg\u0026#41;]\u0026#40;https://sourcegraph.com/github.com/go-errors/errors?badge\u0026#41;)\n\n[//]: # ([![TODOs]\u0026#40;https://badgen.net/https/api.tickgit.com/badgen/github.com/GabrielHCataldo/go-errors/errors\u0026#41;]\u0026#40;https://www.tickgit.com/browse?repo=github.com/GabrielHCataldo/go-errors\u0026#41;)\n\nThe go-errors project came to clarify the return of errors, which are very common in Golang, thus facilitating the\ndebugging your projects.\n\nInstallation\n------------\n\nUse go get.\n\n\tgo get github.com/GabrielHCataldo/go-errors\n\nThen import the go-errors package into your own code.\n\n```go\nimport \"github.com/GabrielHCataldo/go-errors/errors\"\n```\n\nUsability and documentation\n------------\n**IMPORTANT**: Always check the documentation in the structures and functions fields.\nFor more details on the examples, visit [All examples link](https://github/GabrielHCataldo/go-errors/blob/main/_example/main).\n\n### Simple example\n\n```go\npackage main\n\nimport (\n    \"github.com/GabrielHCataldo/go-errors/errors\"\n    \"github.com/GabrielHCataldo/go-logger/logger\"\n)\n\nfunc main() {\n    err := simple()\n    logger.Info(\"simple err:\", err)\n    logger.Info(\"simple err msg:\", errors.Details(err).GetMessage())\n    logger.Info(\"simple err file:\", errors.Details(err).GetFile())\n    logger.Info(\"simple err line:\", errors.Details(err).GetLine())\n    logger.Info(\"simple err func:\", errors.Details(err).GetFuncName())\n    errors.Details(err).PrintCause()\n    errors.Details(err).PrintStackTrace()\n}\n\nfunc simple() error {\n    return errors.New(\"error by message with any value\", 2, true)\n}\n```\n\nOutput:\n\n    [INFO 2024/01/26 10:16:38] _example/main.go:12: simple err: [CAUSE]: (_example/main.go:25) simple: error by message with any value 2 true [STACK]:\n    goroutine 1 [running]:\n    runtime/debug.Stack()\n        /Users/gabrielcataldo/go/go1.21.3/src/runtime/debug/stack.go:24 +0x64\n    github.com/GabrielHCataldo/go-errors/errors.New({0x1400039fd18?, 0x0?, 0x1400039fc38?})\n        /Users/gabrielcataldo/Innovfor/GabrielHCataldo/go-errors/errors/errors.go:31 +0xe0\n    main.simple(...)\n        /Users/gabrielcataldo/Innovfor/GabrielHCataldo/go-errors/_example/main.go:25\n    main.main()\n        /Users/gabrielcataldo/Innovfor/GabrielHCataldo/go-errors/_example/main.go:11 +0x88\n    [INFO 2024/01/26 10:16:38] _example/main.go:12: simple err msg: error by message with any value 2 true\n    [INFO 2024/01/26 10:16:38] _example/main.go:13: simple err file: _example/main.go\n    [INFO 2024/01/26 10:16:38] _example/main.go:14: simple err line: 25\n    [INFO 2024/01/26 10:16:38] _example/main.go:15: simple err func: simple\n    [ERROR 2024/01/26 10:16:38] _example/main.go:16: (_example/main.go:25) simple: error by message with any value 2 true\n    [ERROR 2024/01/26 10:16:38] _example/main.go:17: goroutine 1 [running]:\n\nHow to contribute\n------\nMake a pull request, or if you find a bug, open it\nan Issues.\n\nLicense\n-------\nDistributed under MIT license, see the license file within the code for more details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielhcataldo%2Fgo-errors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrielhcataldo%2Fgo-errors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielhcataldo%2Fgo-errors/lists"}