{"id":13413467,"url":"https://github.com/sagikazarmark/modern-go-application","last_synced_at":"2025-04-11T03:32:52.323Z","repository":{"id":38272666,"uuid":"148784348","full_name":"sagikazarmark/modern-go-application","owner":"sagikazarmark","description":"Modern Go Application example","archived":false,"fork":false,"pushed_at":"2024-11-01T10:29:52.000Z","size":1794,"stargazers_count":1895,"open_issues_count":23,"forks_count":178,"subscribers_count":33,"default_branch":"main","last_synced_at":"2025-04-03T19:56:43.461Z","etag":null,"topics":["application-boilerplate","go","go-kit","go-kit-template","go-microservice","golang","golang-application","golang-examples","golang-server","spotguide"],"latest_commit_sha":null,"homepage":"","language":"Go","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/sagikazarmark.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-09-14T12:19:02.000Z","updated_at":"2025-04-03T00:11:44.000Z","dependencies_parsed_at":"2024-12-05T03:02:40.284Z","dependency_job_id":"51b72297-7b6e-41d6-9ed4-cf5c0d3aab13","html_url":"https://github.com/sagikazarmark/modern-go-application","commit_stats":{"total_commits":763,"total_committers":8,"mean_commits":95.375,"dds":"0.019659239842726106","last_synced_commit":"48f4ca386a88c9b029f416391bcea3de9be8a27a"},"previous_names":[],"tags_count":14,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagikazarmark%2Fmodern-go-application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagikazarmark%2Fmodern-go-application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagikazarmark%2Fmodern-go-application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagikazarmark%2Fmodern-go-application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sagikazarmark","download_url":"https://codeload.github.com/sagikazarmark/modern-go-application/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248335499,"owners_count":21086603,"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":["application-boilerplate","go","go-kit","go-kit-template","go-microservice","golang","golang-application","golang-examples","golang-server","spotguide"],"created_at":"2024-07-30T20:01:41.027Z","updated_at":"2025-04-11T03:32:52.304Z","avatar_url":"https://github.com/sagikazarmark.png","language":"Go","funding_links":[],"categories":["Miscellaneous","Go","杂项","Microsoft Office","项目结构模板","其他杂项","Repositories","Project Layout"],"sub_categories":["Project Layout","项目布局","交互工具","项目结构","项目结构`用于构建项目的非官方模式集。`"],"readme":"# Modern Go Application\n\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#project-layout)\n[![Go Report Card](https://goreportcard.com/badge/github.com/sagikazarmark/modern-go-application?style=flat-square)](https://goreportcard.com/report/github.com/sagikazarmark/modern-go-application)\n[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\u0026style=flat-square)](https://pkg.go.dev/mod/github.com/sagikazarmark/modern-go-application)\n\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/sagikazarmark/modern-go-application/CI?style=flat-square)\n[![CircleCI](https://circleci.com/gh/sagikazarmark/modern-go-application.svg?style=svg)](https://circleci.com/gh/sagikazarmark/modern-go-application)\n[![Gitlab](https://img.shields.io/badge/gitlab-sagikazarmark%2Fmodern--go--application-orange.svg?logo=gitlab\u0026longCache=true\u0026style=flat-square)](https://gitlab.com/sagikazarmark/modern-go-application)\n\n**Go application boilerplate and example applying modern practices**\n\nThis repository tries to collect the best practices of application development using Go language.\nIn addition to the language specific details, it also implements various language independent practices.\n\nSome of the areas Modern Go Application touches:\n\n- architecture\n- package structure\n- building the application\n- testing\n- configuration\n- running the application (eg. in Docker)\n- developer environment/experience\n- telemetry\n\nTo help adopting these practices, this repository also serves as a boilerplate for new applications.\n\n\n## Features\n\n- configuration (using [spf13/viper](https://github.com/spf13/viper))\n- logging (using [logur.dev/logur](https://logur.dev/logur) and [sirupsen/logrus](https://github.com/sirupsen/logrus))\n- error handling (using [emperror.dev/emperror](https://emperror.dev/emperror))\n- metrics and tracing using [Prometheus](https://prometheus.io/) and [Jaeger](https://www.jaegertracing.io/) (via [OpenCensus](https://opencensus.io/))\n- health checks (using [AppsFlyer/go-sundheit](https://github.com/AppsFlyer/go-sundheit))\n- graceful restart (using [cloudflare/tableflip](https://github.com/cloudflare/tableflip)) and shutdown\n- support for multiple server/daemon instances (using [oklog/run](https://github.com/oklog/run))\n- messaging (using [ThreeDotsLabs/watermill](https://github.com/ThreeDotsLabs/watermill))\n- MySQL database connection (using [go-sql-driver/mysql](https://github.com/go-sql-driver/mysql))\n- ~~Redis connection (using [gomodule/redigo](https://github.com/gomodule/redigo))~~ removed due to lack of usage (see [#120](../../issues/120))\n\n\n## First steps\n\nTo create a new application from the boilerplate clone this repository (if you haven't done already) into your GOPATH\nthen execute the following:\n\n```bash\nchmod +x init.sh \u0026\u0026 ./init.sh\n? Package name (github.com/sagikazarmark/modern-go-application)\n? Project name (modern-go-application)\n? Binary name (modern-go-application)\n? Service name (modern-go-application)\n? Friendly service name (Modern Go Application)\n? Update README (Y/n)\n? Remove init script (y/N) y\n```\n\nIt updates every import path and name in the repository to your project's values.\n**Review** and commit the changes.\n\n\n### Load generation\n\nTo test or demonstrate the application it comes with a simple load generation tool.\nYou can use it to test the example endpoints and generate some load (for example in order to fill dashboards with data).\n\nFollow the instructions in [etc/loadgen](etc/loadgen).\n\n\n## Inspiration\n\nSee [INSPIRATION.md](INSPIRATION.md) for links to articles, projects, code examples that somehow inspired\nme while working on this project.\n\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagikazarmark%2Fmodern-go-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsagikazarmark%2Fmodern-go-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagikazarmark%2Fmodern-go-application/lists"}