{"id":18776567,"url":"https://github.com/onsi/gocleanup","last_synced_at":"2026-03-09T20:06:28.664Z","repository":{"id":15572661,"uuid":"18308118","full_name":"onsi/gocleanup","owner":"onsi","description":"GoCleanup: kinda like atexit()","archived":false,"fork":false,"pushed_at":"2014-03-31T21:16:00.000Z","size":140,"stargazers_count":6,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T01:11:28.943Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/onsi.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}},"created_at":"2014-03-31T21:06:01.000Z","updated_at":"2019-05-11T01:47:50.000Z","dependencies_parsed_at":"2022-08-29T13:31:51.255Z","dependency_job_id":null,"html_url":"https://github.com/onsi/gocleanup","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/onsi%2Fgocleanup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onsi%2Fgocleanup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onsi%2Fgocleanup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onsi%2Fgocleanup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onsi","download_url":"https://codeload.github.com/onsi/gocleanup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248690854,"owners_count":21146218,"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":[],"created_at":"2024-11-07T19:46:39.836Z","updated_at":"2026-03-09T20:06:23.632Z","avatar_url":"https://github.com/onsi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"GoCleanup\n=========\n\nIt's kinda like atexit()\n\nGoCleanup is a big bag of singleton methods to enable `atexit`-like behavior in Golang.  If you don't like singletons... move along ;)\n\nIt's simple.  You register functions to run on exit with\n\n```go\ngocleanup.Register(func() {\n    //do stuff\n})\n```\n\nIf the running program receives a SIGINT, or SIGTERM cleanup will intercept the signal, run all the registered clean up functions and then exit with status 1.\n\nIf you want to exit from within your code, you'll need to call\n\n```go\ngocleanup.Exit(statuscode)\n```\n\nto ensure the cleanup callbacks are run.\n\nFinally, if you want to manually invoke the cleanup callbacks (without exiting):\n\n```go\ngocleanup.Cleanup()\n```\n\nthis will also unregister any registered cleanup functions.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsi%2Fgocleanup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonsi%2Fgocleanup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsi%2Fgocleanup/lists"}