{"id":16584573,"url":"https://github.com/brettlangdon/gopkg","last_synced_at":"2026-06-05T19:31:36.619Z","repository":{"id":31776181,"uuid":"35342530","full_name":"brettlangdon/gopkg","owner":"brettlangdon","description":"Go environment manager","archived":false,"fork":false,"pushed_at":"2015-05-09T19:52:55.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-06T05:15:01.957Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/brettlangdon.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}},"created_at":"2015-05-09T19:41:57.000Z","updated_at":"2015-05-09T19:53:36.000Z","dependencies_parsed_at":"2022-08-02T22:01:09.313Z","dependency_job_id":null,"html_url":"https://github.com/brettlangdon/gopkg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brettlangdon/gopkg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettlangdon%2Fgopkg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettlangdon%2Fgopkg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettlangdon%2Fgopkg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettlangdon%2Fgopkg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brettlangdon","download_url":"https://codeload.github.com/brettlangdon/gopkg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettlangdon%2Fgopkg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33957498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-11T22:44:58.519Z","updated_at":"2026-06-05T19:31:36.601Z","avatar_url":"https://github.com/brettlangdon.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"gopkg\n=====\n\n`gopkg` is a helper script for helping you manage your go environment similar to\n`virtualenvwrapper` for python, making it easy to keep project third party\ndependencies isolated.\n\n`gopkg.sh` provides the commands `mkgopkg`, `rmgopkg` and `gopkg` which are used\nto create, remove and activate go projects.\n\nThe first iteration of `gopkg` was written in just a few hours, so no guarantee that it'll work for\neveryone on every system. If you experience any issues, please open an issue and\nI'd be more than happy to investigate with you.\n\n## Setup\n\nDownload the latest version of the script.\n```bash\nmkdir ~/.gopkg\ncurl -o ~/.gopkg/gopkg.sh https://raw.githubusercontent.com/brettlangdon/gopkg/master/gopkg.sh\n```\n\nNext modify your `~/.bashrc` or `~/.zshrc` files to include the following\n```bash\nexport GOPKG_REPO=github.com/username\nexport GOPKG_HOME=~/.gopkg\nsource ~/.gopkg/gopkg.sh\n```\n\n### Environment variables\n\n`gopkg` uses the following environment variables\n\n* `GOPATH` - when creating a new package `gopkg` will create a directory for the\nsource of your package within your `GOPATH`\n* `GOPKG_REPO` - when creating a new package `gopkg` will use `GOPKG_REPO` as\nthe base repository location for your package (e.g. `github.com/username`)\n* `GOPKG_HOME` - when creating a new package `gopkg` will create a new directory\nin `GOPKG_HOME` to store all third party packages (installed normally via `go\nget`) in this directory\n\n\n## Usage\n### Creating a new package\n\nTo create a new package use the command `mkgopkg \u003cname\u003e`. This will create\ndirectories (if they do not already exist) at `$GOPATH/src/$GOPKG_REPO/\u003cname\u003e`\nand `$GOPKG_HOME/\u003cname\u003e` and will update your `GOPATH` to be\n`$GOPKG_HOME/\u003cname\u003e:$GOPATH`.\n\n### Removing an existing package\n\nTo remove an existing package run the command `rmgopkg \u003cname\u003e`. `rmgopkg` will\nonly remove the directory created inside of `$GOPKG_HOME/\u003cname\u003e`, it will not\ntouch the one in `$GOPATH/src/$GOPKG_REPO/\u003cname\u003e`.\n\n### Activating a package\n\nJust like `virtualenv` you have to \"activate\" a package in order to use\nit. Running `gopkg \u003cname\u003e` will activate an existing package. What it does is\nsimply update your `GOPATH` to be `$GOPKG_HOME/\u003cname\u003e:$GOPATH` and add `(\u003cname\u003e)\n` to `PS1`.\n\nThe updated `GOPATH` allows `go get` to install all packages into\n`$GOPKG_HOME/\u003cname\u003e` while still being able to successfully find you source\npackage in `$GOPATH/src/$GOPKG_REPO/\u003cname\u003e`.\n\n### Deactivating a package\n\nWhen you are done and want to reset your `PS1` and `GOPATH` variables simply run\n`deactivate`. `deactivate` is a command which is only available once you have\nrun `gopkg \u003cname\u003e`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrettlangdon%2Fgopkg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrettlangdon%2Fgopkg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrettlangdon%2Fgopkg/lists"}