{"id":16280984,"url":"https://github.com/corebreaker/texit","last_synced_at":"2025-08-03T06:39:46.206Z","repository":{"id":57552746,"uuid":"74051413","full_name":"corebreaker/texit","owner":"corebreaker","description":"You could use os.Exit() in Go tests","archived":false,"fork":false,"pushed_at":"2019-05-15T05:34:38.000Z","size":62,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T16:54:34.786Z","etag":null,"topics":["go","golang","testing","testing-tools"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/corebreaker.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":"2016-11-17T17:35:27.000Z","updated_at":"2019-05-15T05:33:45.000Z","dependencies_parsed_at":"2022-09-26T18:50:51.030Z","dependency_job_id":null,"html_url":"https://github.com/corebreaker/texit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corebreaker%2Ftexit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corebreaker%2Ftexit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corebreaker%2Ftexit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corebreaker%2Ftexit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corebreaker","download_url":"https://codeload.github.com/corebreaker/texit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247931041,"owners_count":21020156,"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":["go","golang","testing","testing-tools"],"created_at":"2024-10-10T19:04:19.709Z","updated_at":"2025-04-08T21:31:41.732Z","avatar_url":"https://github.com/corebreaker.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# texit\n[![Report](https://goreportcard.com/badge/github.com/corebreaker/texit?style=plastic)](https://goreportcard.com/report/github.com/corebreaker/texit)\n[![Build Status](https://img.shields.io/travis/com/corebreaker/texit/master.svg?style=plastic)](https://travis-ci.com/corebreaker/texit)\n[![Coverage Status](https://img.shields.io/coveralls/github/corebreaker/texit/master.svg?style=plastic)](https://coveralls.io/github/corebreaker/texit)\n[![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=plastic)](https://godoc.org/github.com/corebreaker/texit)\n[![GitHub license](https://img.shields.io/github/license/corebreaker/texit.svg?color=blue\u0026style=plastic)](https://github.com/corebreaker/texit/blob/master/LICENSE)\n[![Release](https://img.shields.io/github/release/corebreaker/texit.svg?style=plastic)](https://github.com/corebreaker/texit/releases)\n\nYes, you can use os.Exit() in Go tests.\n\nInspired by https://talks.golang.org/2014/testing.slide#23\n\n\n## Example in a testing function\n\n```golang\nimport (\n\t\"os\"\n\n\t\"github.com/corebreaker/texit\"\n)\n\nfunc TestWithExitDirectCall(t *testing.T) {\n\tstdout, stderr, status, err := DoTestWithExit(func() {\n\t\t// Something to do\n\n\t\tos.Exit(0)\n\t})\n\n\t// …\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorebreaker%2Ftexit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorebreaker%2Ftexit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorebreaker%2Ftexit/lists"}