{"id":13764158,"url":"https://github.com/alouche/rodent","last_synced_at":"2025-05-10T17:31:42.958Z","repository":{"id":17583033,"uuid":"20386542","full_name":"alouche/rodent","owner":"alouche","description":"Manage Go Versions/Projects/Dependencies","archived":false,"fork":false,"pushed_at":"2017-04-22T07:47:52.000Z","size":139,"stargazers_count":33,"open_issues_count":6,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-16T23:32:37.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://alouche.net/rodent/","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/alouche.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":"2014-06-01T21:08:42.000Z","updated_at":"2023-11-07T12:37:47.000Z","dependencies_parsed_at":"2022-09-08T11:30:40.450Z","dependency_job_id":null,"html_url":"https://github.com/alouche/rodent","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alouche%2Frodent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alouche%2Frodent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alouche%2Frodent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alouche%2Frodent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alouche","download_url":"https://codeload.github.com/alouche/rodent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253453363,"owners_count":21911083,"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-08-03T15:01:17.052Z","updated_at":"2025-05-10T17:31:42.527Z","avatar_url":"https://github.com/alouche.png","language":"Shell","funding_links":[],"categories":["Software Packages","软件包","DevOps Tools","Go Tools","Go 工具","軟件包"],"sub_categories":["DevOps Tools","DevOps 工具","devops 工具","Contents","代码分析","DevOps工具"],"readme":"# rodent\n[![Build Status](https://travis-ci.org/alouche/rodent.svg?branch=master)](https://travis-ci.org/alouche/rodent)\n\nrodent is a shell (bash) application which:\n\n* Manages multiple versions of Go.\n* Allows you to test/build your projects against multiple Go releases at ease.\n* Allows cross-compile builds for different platform targets (cgo/stdlib [workaround](https://groups.google.com/d/msg/golang-nuts/2XoGUvBalcw/ErSWiTlO17kJ)).\n* Manages/tracks librairies dependencies by expanding the GOPATH\n* Create separate workflows within a project per environment (i.e: build projectA with ENV=\"PRD\" on go1.2.2 and ENV=\"DEV\" on go1.3beta2)\n\nThis is achieved without getting in your way or hijacking your shell executables/builtins by making use of [shims](http://en.wikipedia.org/wiki/Shim_%28computing%29).\n\n## In a nutshell\n\nScreencasts\n\nManage multiple versions:\n\n[![asciicast](https://asciinema.org/a/15316.png)](https://asciinema.org/a/15316)\n\nrodentrc usage:\n\n[![asciicast](https://asciinema.org/a/15315.png)](https://asciinema.org/a/15315)\n\n```bash\n$ rodent\nUsage: rodent [command] [args]\n       help        Display the help\n       set         Set a version of Go\n       init        Init current shell\n       install     Install a version of Go\n       versions    Display installed/in-use version(s)\n       uninstall   Uninstall a version of Go\n\n       system      Maintenance routines\n```\n\nFor more information, checkout the [Wiki](https://github.com/alouche/rodent/wiki)\n\n## Install\n```bash\ngit clone http://github.com/alouche/rodent.git /my/path/to/rodent\n\n# Add in your .bashrc, profile etc.\n\n[[ -s \"/my/path/to/rodent\" ]] \u0026\u0026 source \"/my/path/to/rodent\"\n\n# Restart your existing shell or open an new one and you are set. Type \"rodent\".\n```\n\n## Highlight Features\n\n* Define a specific go version per project source/directory\n```bash\necho \"gover=go1.2.2\" \u003e\u003e .rodentrc\n\n# Build your project\ngo build\n\n# Want to switch between multiple go versions in the same project (for testing new builds)\necho \"gover_ATAG=go1.3beta2\" \u003e\u003e .rodentrc\n\n# Export your tag as variable\nexport RODENT_ENV=ATAG\n\n# Build your project\ngo build\n``` \nAny rodent variables when suffixed with \"\\_\u003cLABEL\u003e\" are scopped as variables for the defined enviroment scope \u003cLABEL\u003e; variables without these \u003cLABEL\u003e suffixes are used as default variables\n\n* Keep track of your project third party libraries\n```bash\necho \"godeps=/my/project/workspace\" \u003e\u003e .rodentrc\n\n# A dependency target per environment? easy...\necho \"godeps_production=./local/prd/path\" \u003e\u003e .rodentrc\necho \"godeps_development=./local/dev/path\" \u003e\u003e .rodentrc\n  \n# Fetch your dependencies\nexport RODENT_ENV=production\ngo get\n\n# Alternatively\nexport RODENT_ENV=experimental\ngo build\n```\n\nYou get the idea... for more information, please refer to the [rodentrc guide](https://github.com/alouche/rodent/wiki/rodentrc-file).\n\n### Update rodent\n```bash\nrodent system -u\n```\n\n## Cross-compilation\nPlease refer to [cross-compilation environment](https://github.com/alouche/rodent/wiki/cross-compilation-setup)\n\n## Why this project?\n\n* I wanted something light/small which allowed all the above while being transparent and out of the way.\n* Managing and tracking my third party libraries by maintaining a separate directory per project which I could simply \"tar; cp and or even git submodule..\" \n* I prefer using a custom GOPATH per project (or sometimes have a unique GOPATH for a subset of projects) and wanted to keep the \"standard go workflow way of things\" while maintaining that flexiblity/option.\n* This is an experiment.\n\n### Disclaimer\n\nThis project is relatively new and not perfect. It still requires a lot of work and does not pretend to be better than the numerous awesome tools the Golang community has created. It is just one way of tackling \"Go version and dependency management\", if you like it, use it and feel free to contribute.\n\n## Contributing\n\nrodent is not locked to a specific way of doing things, so if you have or found a better way to do things or tackle some of the challenges listed here, then I would love to hear of it, so \"Go\" forth - fork, patch, submit and inspire. The only dependency is that rodent should remain non-intrusive to the user's workflow and relatively light.\n\n## Other tools in the same category\n* [GVM](https://github.com/moovweb/gvm)\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2014 Ali Abbas\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falouche%2Frodent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falouche%2Frodent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falouche%2Frodent/lists"}