{"id":16163808,"url":"https://github.com/sug0/go-exit","last_synced_at":"2025-04-07T04:44:48.669Z","repository":{"id":98037838,"uuid":"135364390","full_name":"sug0/go-exit","owner":"sug0","description":"Finally respect your damn deferred function calls on `err != nil`","archived":false,"fork":false,"pushed_at":"2019-02-05T23:56:07.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T08:54:16.676Z","etag":null,"topics":["different","err","exit","fatal","go","log","nil"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sug0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-05-29T23:49:30.000Z","updated_at":"2019-02-05T23:56:08.000Z","dependencies_parsed_at":"2024-01-14T03:24:33.053Z","dependency_job_id":null,"html_url":"https://github.com/sug0/go-exit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sug0%2Fgo-exit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sug0%2Fgo-exit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sug0%2Fgo-exit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sug0%2Fgo-exit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sug0","download_url":"https://codeload.github.com/sug0/go-exit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595374,"owners_count":20963942,"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":["different","err","exit","fatal","go","log","nil"],"created_at":"2024-10-10T02:44:30.728Z","updated_at":"2025-04-07T04:44:48.649Z","avatar_url":"https://github.com/sug0.png","language":"Go","readme":"# Who is this for?\n\nFor our naive gophers who call `log.Fatal(err)` or `os.Exit(1)` after\ndoing some shit like `defer f.Close()`.\n\n# Usage\n\nBuckle up boys and galz...\n\n```go\npackage main\n\nimport (\n    \"os\"\n    \"fmt\"\n    \"exit\"\n)\n\ntype ExitStatus int\n\nfunc (s ExitStatus) ExitCode() int {\n    fmt.Fprintln(os.Stderr, \"OMG IT ALL WENT DOWN THE SHITTER\")\n    return int(s)\n}\n\nfunc main() {\n    defer exit.Handler()\n    defer fmt.Println(\"it worked I guess\")\n    exit.WithStatus(ExitStatus(2))\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsug0%2Fgo-exit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsug0%2Fgo-exit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsug0%2Fgo-exit/lists"}