{"id":28704913,"url":"https://github.com/anacrolix/godo","last_synced_at":"2025-06-14T14:08:59.471Z","repository":{"id":144205381,"uuid":"38191830","full_name":"anacrolix/godo","owner":"anacrolix","description":"godo is an improved `go run`","archived":false,"fork":false,"pushed_at":"2024-02-22T23:56:23.000Z","size":26,"stargazers_count":37,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T21:01:29.819Z","etag":null,"topics":["build-tool","go","golang","wrapper"],"latest_commit_sha":null,"homepage":"","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/anacrolix.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},"funding":{"github":"anacrolix","patreon":"anacrolix","issuehunt":"anacrolix"}},"created_at":"2015-06-28T08:25:24.000Z","updated_at":"2024-05-01T21:01:29.820Z","dependencies_parsed_at":"2023-06-18T15:37:41.644Z","dependency_job_id":null,"html_url":"https://github.com/anacrolix/godo","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/anacrolix/godo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Fgodo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Fgodo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Fgodo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Fgodo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anacrolix","download_url":"https://codeload.github.com/anacrolix/godo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Fgodo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259827667,"owners_count":22917714,"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":["build-tool","go","golang","wrapper"],"created_at":"2025-06-14T14:08:54.793Z","updated_at":"2025-06-14T14:08:59.448Z","avatar_url":"https://github.com/anacrolix.png","language":"Go","funding_links":["https://github.com/sponsors/anacrolix","https://patreon.com/anacrolix","https://issuehunt.io/r/anacrolix"],"categories":[],"sub_categories":[],"readme":"# godo\n\n`godo` is an alternative to `go run`. It's useful when you want to avoid the `go build`/`go install`, `/path/to/somebin` cycle. There's also a bash completion script, which makes it easy to quickly invoke a Go package from your `GOPATH`.\n\n`godo` differs from `go run` in the following respects:\n\n* The package to execute is specified by import path, rather than some constituent source files.\n - `godo github.com/anacrolix/missinggo/cmd/nop` vs.\n - `go run $GOPATH/src/github.com/anacrolix/missinggo/cmd/nop/*.go`\n* The generated binary is stored at `$TMPDIR/godo/$pkgname.$$`. This means that:\n - It's easy to locate the binary for a process running through godo.\n - The proctitle is `$pkgname.$$`, e.g. `torrent.123`, where the package name of the binary was `torrent`, and its PID is `123`.\n - There is a bounded history of binaries due to the OS PID reuse policy. After PIDs cap at around 32K, they'll return to lower values, gradually replacing older binaries that are no longer associated with running processes.\n* The main package isn't rebuilt unnecessarily, avoiding a link step for successive `godo` calls to the same package. For example a `go run` invocation for a large application on my system has a mandatory ~0.8s delay even if the files haven't changed. `godo` has this at 0.04s, because it's able to reuse the existing binary.\n\n## Usage\n\n```sh\n$ godo -h\ngodo is an alternative to `go run`.\n\nUsage:\n  godo [go build flags] \u003cpackage spec\u003e [binary arguments]\n  godo -h | --help\n```\n\n### Example\n```\n# first run\n$ time godo github.com/anacrolix/missinggo/cmd/nop\n\nreal\t0m0.244s\nuser\t0m0.177s\nsys\t    0m0.071s\n\n$ time godo github.com/anacrolix/missinggo/cmd/nop\n\nreal\t0m0.046s\nuser\t0m0.012s\nsys\t    0m0.022s\n\n# historical binaries\n$ ls -tr $TMPDIR/godo/ | grep nop.\nnop.40586\nnop.40590\n```\n\n## Installation\n\n    go install github.com/anacrolix/godo@latest\n\nBash completion:\n\n    go install github.com/anacrolix/godo/go-list-cmd@latest\n    . \"$GOPATH/src/github.com/anacrolix/godo/complete.sh\"\n\n## Godo-ception\n\n```\n$ godo github.com/anacrolix/godo cmd/go run \"$GOPATH/src/github.com/anacrolix/godo/\"*.go cmd/go list github.com/anacrolix/...\n\u003call my herptastic Go code\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanacrolix%2Fgodo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanacrolix%2Fgodo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanacrolix%2Fgodo/lists"}