{"id":29430254,"url":"https://github.com/aeimer/go-error-simulator","last_synced_at":"2025-07-12T17:05:56.187Z","repository":{"id":303769081,"uuid":"1016615894","full_name":"aeimer/go-error-simulator","owner":"aeimer","description":"HTTP Server with control over response code, latency, stdout and stderr","archived":false,"fork":false,"pushed_at":"2025-07-09T09:38:43.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-09T10:42:35.885Z","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/aeimer.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,"zenodo":null}},"created_at":"2025-07-09T09:17:29.000Z","updated_at":"2025-07-09T09:38:00.000Z","dependencies_parsed_at":"2025-07-09T10:52:50.781Z","dependency_job_id":null,"html_url":"https://github.com/aeimer/go-error-simulator","commit_stats":null,"previous_names":["aeimer/go-error-simulator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aeimer/go-error-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeimer%2Fgo-error-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeimer%2Fgo-error-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeimer%2Fgo-error-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeimer%2Fgo-error-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aeimer","download_url":"https://codeload.github.com/aeimer/go-error-simulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeimer%2Fgo-error-simulator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265024858,"owners_count":23699620,"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":"2025-07-12T17:05:55.659Z","updated_at":"2025-07-12T17:05:56.182Z","avatar_url":"https://github.com/aeimer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-error-simulator\n\nThis simple app is an HTTP server which lets you control the response and behavior in several ways.\nOptions are:\n\n* returned HTTP status code\n* print text to STDOUT\n* print text to STDERR\n* add a (random) delay before returning the response\n\n## Usage\n\n**Run locally**\n\n```\ngo run main.go\n```\n\nThen you can access the server at `http://localhost:8080`.\n\n**Run via Docker**\n\n```\ndocker run -p 8080:8080 -it --rm ghcr.io/aeimer/go-error-simulator:latest\n```\n\nThen you can access the server at `http://localhost:8080`.\n\n## API\n\n### `GET /`\n\nReturns a simple HTML page with a link to the API documentation.\n\n### `GET /simulate`\n\nSimulates an error based on the query parameters. The following parameters are supported:\n- `status`: HTTP status code to return (default: 200)\n- `stdout`: text to print to STDOUT (default: empty)\n- `stderr`: text to print to STDERR (default: empty)\n- `latency`: delay in milliseconds before returning the response (default: 0)\n  - exact number: `latency=100`\n  - random range: `latency=100-200`\n  - random range shortcut: `latency=-100` (random between 0 and 100)\n\nExamples:\n```bash\ncurl \"http://localhost:8080/simulate?status=200\"\ncurl \"http://localhost:8080/simulate?status=500\u0026stdout=Hello%20World\u0026stderr=Error%20Message\u0026latency=100\"\ncurl \"http://localhost:8080/simulate?status=404\u0026stdout=Not%20Found\u0026latency=200-300\"\ncurl \"http://localhost:8080/simulate?status=200\u0026stdout=OK\u0026latency=-100\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeimer%2Fgo-error-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faeimer%2Fgo-error-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeimer%2Fgo-error-simulator/lists"}