{"id":20872511,"url":"https://github.com/romnn/cookiecutter-go","last_synced_at":"2025-07-31T13:33:47.783Z","repository":{"id":50174829,"uuid":"247197245","full_name":"romnn/cookiecutter-go","owner":"romnn","description":"opinionated cookiecutter template for golang projects","archived":false,"fork":false,"pushed_at":"2022-12-08T07:46:00.000Z","size":437,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-13T10:48:27.242Z","etag":null,"topics":["bootstrap","cookiecutter-template","golang-package","python","template"],"latest_commit_sha":null,"homepage":"https://romnnn.github.io/cookiecutter-go","language":"Python","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/romnn.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-14T02:23:26.000Z","updated_at":"2024-01-02T00:57:38.000Z","dependencies_parsed_at":"2022-08-30T14:41:55.882Z","dependency_job_id":null,"html_url":"https://github.com/romnn/cookiecutter-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/romnn/cookiecutter-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fcookiecutter-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fcookiecutter-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fcookiecutter-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fcookiecutter-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romnn","download_url":"https://codeload.github.com/romnn/cookiecutter-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romnn%2Fcookiecutter-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268047867,"owners_count":24187207,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"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":["bootstrap","cookiecutter-template","golang-package","python","template"],"created_at":"2024-11-18T06:19:11.730Z","updated_at":"2025-07-31T13:33:47.762Z","avatar_url":"https://github.com/romnn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. highlight:: console\n\n===============================\nCookiecutter Go Template\n===============================\n\n.. image:: https://github.com/romnn/cookiecutter-go/workflows/test/badge.svg\n    :target: https://github.com/romnn/cookiecutter-go/actions \n    :alt: Build status\n\nOpinionated ``cookiecutter`` template for golang projects.\n\nThe key features of this template include:\n\n* Support for ``golang`` 1.11+ modules\n* Pre-commit hooks via `pre-commit \u003chttps://pre-commit.com/\u003e`_ including:\n\n  * `gofmt \u003chttps://golang.org/cmd/gofmt/\u003e`_ to automatically format source files\n  * `govet \u003chttps://golang.org/cmd/vet/\u003e`_ to statically lint source files\n  * `golint \u003chttps://godoc.org/golang.org/x/lint/golint\u003e`_ to lint source files\n  * `goimports \u003chttps://godoc.org/golang.org/x/tools/cmd/goimports\u003e`_ to check imports\n  * `gocyclo \u003chttps://github.com/fzipp/gocyclo\u003e`_ to check for too complex functions\n  * ``go build`` to check successful builds\n\n* Automatic testing and deployment of binaries to GitHub releases via `travis-ci.com \u003chttps://travis-ci.com\u003e`_\n* Pre configured repository including sample tests, a nice README and contribution guide and more\n* Measuring test coverage for `codecov.io \u003chttps://codecov.io/\u003e`_\n* `bump2version \u003chttps://github.com/c4urself/bump2version\u003e`_ for version management\n* Dockerfile for deploying binaries as containers\n\n\nQuickstart\n----------\n\nPrerequisites\n^^^^^^^^^^^^^^^\n\nBefore you get started, make sure you have installed the following tools::\n\n    $ python3 -m pip install -U cookiecutter\u003e=1.4.0\n    $ python3 -m pip install pre-commit bump2version invoke ruamel.yaml halo\n    $ go get -u golang.org/x/tools/cmd/goimports\n    $ go get -u golang.org/x/lint/golint\n    $ go get -u github.com/fzipp/gocyclo/cmd/gocyclo\n    $ go get -u github.com/mitchellh/gox  # if you want to test building on different architectures\n\n**Remember**: To be able to excecute the tools downloaded with ``go get``, \nmake sure to include ``$GOPATH/bin`` in your ``$PATH``.\nIf ``echo $GOPATH`` does not give you a path make sure to set it\n(``export GOPATH=\"$HOME/go\"`` for example). On order for your changes to persist, \ndo not forget to add these to your shells ``.bashrc``.\n\nCreate a new go project\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nNavigate to wherever you want your project to be created, and run cookiecutter (you will be asked for the project name etc)::\n\n    $ cookiecutter https://github.com/romnn/cookiecutter-go.git\n\nAfter your project was created:\n\n* Create a remote repository and publish your project::\n\n    $ cd \u003cmypackage\u003e\n    $ git remote add origin git@github.com:myusername/mypackage.git\n    $ git add .\n    $ pre-commit run --all-files\n    $ git add .\n    $ git commit -m \"Initial commit\"\n    $ git push --set-upstream origin master\n\n* Add the repo to your `Travis-CI`_ account. If you have connected travis with GitHub this is done automatically.\n* If you choose *tool* or *both* for your project and want to publish pre built release binaries,\n  `install the Travis CLI`_ and run::\n\n    $ travis login                  # Login with your GitHub credentials\n    $ travis setup releases         # When using travis.org\n    $ travis setup releases --com   # When using travis.com\n\n  to automatically encrypt a GitHub OAuth token into your ``.travis.yml`` config.\n\n  Unfortunately, the travis cli tool appends the token at the config's top level,\n  so you need to manually edit the ``.travis.yml`` config or run::\n\n    $ invoke fix-token\n\n  Now you can push the updated ``.travis.yml`` to your remote repository::\n\n    $ git add .travis.yml\n    $ git commit -m \"Add GitHub releases token\"\n    $ git push\n\n  If you do not want to publish pre-built releases,\n  remove the *Publish release* stage in ``.travis.yml``.\n\n* If you want to publish the tool as a ``docker`` container, connect `hub.docker.com \u003chttps://https://hub.docker.com/\u003e`_ with\n  your GitHub account and `create a new repository \u003chttps://hub.docker.com/repository/create\u003e`_.\n  \n  Make sure to choose a matching name and connect your GitHub repository at the bottom of the page.\n  You must also specify the location of the ``Dockerfile`` (choose the default ``/``).\n  When you are done click *Create and build*.\n\n* Start coding!::\n\n  $ go build \u003cyour-package\u003e\n  $ invoke run -- --name Roman  # If you chose \"tool\" or \"both\"\n  $ pre-commit run --all-files\n\n* Release new versions of your package by pushing a new tag to master::\n\n    $ bump2version (major | minor | patch)\n    $ git push --follow-tags\n\n.. _Travis-CI: https://travis-ci.com\n.. _Install the Travis CLI: https://github.com/travis-ci/travis.rb#installation\n\nDocumentation\n-------------\n\nIf you need more guidance I encourage you to have a look at the `more extensive documentation`_.\n\n.. _`more extensive documentation`: https://cookiecutter-go.readthedocs.io/en/latest/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromnn%2Fcookiecutter-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromnn%2Fcookiecutter-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromnn%2Fcookiecutter-go/lists"}