{"id":13439000,"url":"https://github.com/vincentbernat/hellogopher","last_synced_at":"2025-04-09T06:10:55.310Z","repository":{"id":16334172,"uuid":"79730169","full_name":"vincentbernat/hellogopher","owner":"vincentbernat","description":"Makefile to build a Go project","archived":false,"fork":false,"pushed_at":"2024-10-01T08:57:36.000Z","size":71,"stargazers_count":309,"open_issues_count":2,"forks_count":63,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-10-11T14:39:51.506Z","etag":null,"topics":["golang","makefile"],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vincentbernat.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}},"created_at":"2017-01-22T16:42:26.000Z","updated_at":"2024-10-02T15:44:56.000Z","dependencies_parsed_at":"2023-11-06T06:35:42.077Z","dependency_job_id":"94ccad4c-888c-4728-98be-fe620444212b","html_url":"https://github.com/vincentbernat/hellogopher","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentbernat%2Fhellogopher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentbernat%2Fhellogopher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentbernat%2Fhellogopher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vincentbernat%2Fhellogopher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vincentbernat","download_url":"https://codeload.github.com/vincentbernat/hellogopher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987285,"owners_count":21028895,"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":["golang","makefile"],"created_at":"2024-07-31T03:01:10.335Z","updated_at":"2025-04-09T06:10:55.293Z","avatar_url":"https://github.com/vincentbernat.png","language":"Makefile","funding_links":[],"categories":["HarmonyOS","Makefile"],"sub_categories":["Windows Manager"],"readme":"# Makefile for Go projects (1.24+)\n\nThis is an example of `Makefile` to build a Go project. This is quite\nsimilar to [Filippo Valsorda's hellogopher](https://github.com/cloudflare/hellogopher).\n\nInitially, this is for people who don't know about `GOPATH` or who\ndon't want to use it (like me). However, starting with Go 1.11,\nmodules enable to work outside of `GOPATH` without any special\nenvironment. This turns this `Makefile` as only a convenience tool.\n\nThis `Makefile` may not be used as is. It is expected to be modified\nto fit your needs. See [Akvorado's\nMakefile](https://github.com/akvorado/akvorado/blob/main/Makefile) for\nan example on a more complex project.\n\n## Dependencies\n\nThis example relies on modules to retrieve dependencies. This requires use of Go\n1.24 or more recent. To update a dependency, use `go get DEPENDENCY@REVISION` or\n`go get -tool DEPENDENCY@REVISION` if this is a tool.\n\nYou can checkout tag [v0.6][] if you need compatibility down to Go 1.11 or tag\n[v1.4][] if you need compatibility down to Go 1.16.\n\n[v0.6]: https://github.com/vincentbernat/hellogopher/tree/v0.6\n[v1.4]: https://github.com/vincentbernat/hellogopher/tree/v1.4\n\nSome tools now require more recent versions of Go (1.22+), but it would be\npossible to pin them to older versions.\n\nOn first build, you need to run `go mod init PROJECTNAME`.\n\n## Versioning\n\nVersion is extracted from git tags using anything prefixed by `v`.\n\n## Usage\n\nThe following commands are available:\n\n - `make help` to get help\n - `make` to build the binary (in `bin/`)\n - `make test` to run tests\n - `make test-verbose` to run tests in verbose mode\n - `make test-race` for race tests\n - `make test-coverage` for test coverage (will output `coverage.html`\n   and `coverage.xml` in `test/`.\n - `make test PKG=helloworld/hello` to restrict test to a package\n - `make clean`\n - `make lint` to run golint\n - `make fmt` to run gofmt\n\nBe sure to browse the `Makefile` to understand what it does. Files other than\n`.gitignore` and `Makefile` are just examples.\n\n## Misc\n\nIf you prefer, you can also include this Makefile into another one.\nRename it to `hellogopher.mk` and put in `Makefile` something like\nthis:\n\n    include hellogopher.mk\n    \n    # Your custom settings\n    TIMEOUT=10\n    \n    # Your custom rules\n    doc: ; $(info $(M) build documentation) @ ## Build documentation\n    \t$(MAKE) -C doc\n\n## License\n\nThis `Makefile` is published under the CC0 1.0 license. See `LICENSE`\nfor more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentbernat%2Fhellogopher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvincentbernat%2Fhellogopher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentbernat%2Fhellogopher/lists"}