{"id":13462188,"url":"https://github.com/go-training/training","last_synced_at":"2025-05-15T20:00:45.759Z","repository":{"id":18819122,"uuid":"84264658","full_name":"go-training/training","owner":"go-training","description":"Learning Golang one day","archived":false,"fork":false,"pushed_at":"2024-04-19T13:09:35.000Z","size":5064,"stargazers_count":1442,"open_issues_count":13,"forks_count":288,"subscribers_count":50,"default_branch":"master","last_synced_at":"2024-10-29T15:33:46.714Z","etag":null,"topics":["golang","training"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/go-training.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-03-08T01:34:28.000Z","updated_at":"2024-10-29T09:29:21.000Z","dependencies_parsed_at":"2024-01-13T01:38:26.336Z","dependency_job_id":"4e445f41-cdca-403b-a885-b8a0e0b10580","html_url":"https://github.com/go-training/training","commit_stats":{"total_commits":425,"total_committers":5,"mean_commits":85.0,"dds":"0.018823529411764683","last_synced_commit":"2a3184482befaefa6aa975e2f168114173af786b"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-training%2Ftraining","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-training%2Ftraining/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-training%2Ftraining/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-training%2Ftraining/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-training","download_url":"https://codeload.github.com/go-training/training/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254414457,"owners_count":22067263,"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","training"],"created_at":"2024-07-31T12:00:41.680Z","updated_at":"2025-05-15T20:00:45.647Z","avatar_url":"https://github.com/go-training.png","language":"HTML","funding_links":[],"categories":["Go","Uncategorized","HTML","Golang","Interview / Learning"],"sub_categories":["Uncategorized","Learn"],"readme":"# Golang Training\n\n[![Run Tests](https://github.com/go-training/training/actions/workflows/go.yml/badge.svg)](https://github.com/go-training/training/actions/workflows/go.yml)\n\nLearning basic [Golang](https://go.dev/) in one day\n\n## Example code\n\n- [example01](./example01-hello-world): Show hello world. Try to use [golint][1] and [gofmt][2] tool.\n- [example02](./example02-golang-package): Let's [write a library][3] and use it from the hello program.\n- [example03](./example03-if-switch-const): How to use `if`, `switch` and `const` in Go.\n- [example04](./example04-constructor-and-struct): How to initializing `constructor` in Go.\n- [example05](./example05-interface): Create interface for multiple struct.\n- [example06](./example06-go-concurrency): How to use Goroutines in Go, share by communicating.\n- [example07](./example07-errors-hanlder): Errors handler in Go.\n- [example08](./example08-type-assertions): A type assertion provides access to an interface value.\n- [example09](./example09-command-line-tool): Write command line tool in Go.\n- [example10](./example10-simple-http-server): Simple http server and show example using [gin][4] framework.\n- [example11](./example11-cross-build): Learn go build constraints.\n- [example12](./example12-build-with-docker): Building minimal docker containers for go application.\n- [example13](./example13-share-golang-package-to-c): Sharing Golang packages to C and Go.\n- [example14](./example14-go-func): How to use func in go?\n- [example15](./example15-pass-slice-as-function-args): How to pass slice as function arguments?\n- [example16](./example16-init-func): What is init function in Go?\n- [example17](./example17-json): How to handle json in Go?\n- [example18](./example18-write-testing-and-doc): How to write testingin Go?\n- [example19](./example19-deploy-with-kubernetes): Deploy golang app using [drone](https://drone.io/) + [kubernetes](https://kubernetes.io/).\n- [example20](./example20-write-benchmark): write simple benchmark.\n- [exmaple21](./example21-simple-golang-https-tls): Simple https-tls server example using [mkcert](https://github.com/FiloSottile/mkcert).\n- [exmaple22](./example22-go-module-in-go.11): How to use [go module](https://github.com/golang/go/wiki/Modules) in go version 1.11.\n- [example23](./example23-deploy-go-application-with-up): Deploy go application useing [apex/up](https://github.com/apex/up) tool.\n- [example24](./example24-debug-go-code-using-vs-code): Debug golang code in vscode using [dlv](https://github.com/go-delve/delve).\n- [example25](./example25-traefik-golang-app-lets-encrypt): Running golang app using [traefik \u0026 Let's Encrypt \u0026 Docker](https://docs.traefik.io/user-guide/docker-and-lets-encrypt/).\n- [example27](./example27-how-to-load-env): How to loads environment variables from `.env`.\n- [example28](./example28-webserver-with-gracefull-shutdown): Go webserver with gracefull shutdown.\n- [example29](./example29-handle-multiple-channel): How to handle multiple Go channel?\n- [example30](./example30-context-timeout): Simplest Way to Handle Timeouts?\n- [example31](./example31-job-queue): How to implements a simple job queue? [Youtube](https://www.youtube.com/watch?v=wvdbobFiXNg)\n- [example32](./example32-what-is-select): four tips with `select` in golang.\n- [example33](./example33-share-memory-by-communicating): share memory by communicating.\n- [example34](./example34-graceful-shutdown-with-worker): graceful shutdown with multiple workers.\n- [example35](./example35-goroutine-with-context): introduction to context package.\n- [example36](./example36-performance): performance result with differnet concat string method.\n- [example38](./example38-concurrency-is-still-not-easy): concurrency is still not easy. [English Blog](https://utcc.utoronto.ca/~cks/space/blog/programming/GoConcurrencyStillNotEasy), [Chinese Blog](https://blog.wu-boy.com/2020/09/limit-concurrency-in-golang/)\n- [example39](./example39-select-random-channel): select random channel value?\n- [example40](./example40-embedding-files): [go 1.16](https://tip.golang.org/doc/go1.16) support [Embedding Files](https://tip.golang.org/pkg/embed/), [Chinese Blog](https://blog.wu-boy.com/2020/12/embedding-files-in-go-1-16/)\n- [example41](./example41-using-buffer-channel-signal) why use buffered channel signal? [Chinese Blog](https://blog.wu-boy.com/2021/03/why-use-buffered-channel-in-signal-notify/)\n- [example42](./example42-three-goroutine-interview/README.md) Please use three goroutines to run 10 times each, and output `cat`, `dog`, `bird` in order\n- [example43](./example43-progress-bar/README.md) graceful shutdown with progress bar. [Chinese Blog](https://blog.wu-boy.com/2021/05/graceful-shutdown-with-progress-bar-in-golang/)\n- [example44](./example44-signal-with-docker-compose) graceful stop service using docker-compose. [Chinese Blog](https://blog.wu-boy.com/2021/06/graceful-stop-service-using-docker-compose-in-golang/)\n- [example45](./example45-go-1.18-generics) introduction to go1.18 generics. [Chinese Blog](https://blog.wu-boy.com/2022/02/introduction-to-golang-1-18-generics/)\n- [example46](./example46-go-1.18-generics-part2) introduction to go1.18 generics constraints, slices and maps packages. [Chinese Blog](https://blog.wu-boy.com/2022/02/golang-1-18-generics-constraints-slices-maps/)\n- [example47](./example47-pyroscope-adhoc-profiling) pyroscope adhoc profiling in go. [Chinese Blog](https://blog.wu-boy.com/2022/02/pyroscope-adhoc-profiling-in-golang/)\n- [example48](./example48-pub-sub-pattern) simple pub/sub pattern in go. [Chinese Blog](https://blog.wu-boy.com/2022/04/simple-publish-subscribe-pattern-in-golang/)\n- [example49](./example49-dependency-injection/) Dependency Injection using wire tool. [Chinese Blog](https://blog.wu-boy.com/2022/09/dependency-injection-in-go/)\n- [exmaple50](./example50-consumer-producer-pattern/) simple scheduler with multiple worker. [Chinese Blog](https://blog.wu-boy.com/2022/11/simple-scheduler-with-multiple-worker-using-golang/)\n- [example51](./example51-canceler/) How to cancel a running task between backend and worker service. [Chinese Blog](https://blog.wu-boy.com/2022/12/system-design-how-to-cancel-a-running-task-in-golang/)\n- [example52](./example52-ring-buffer-queue/) ring buffer queue with fixed size. [Chinese Blog](https://blog.wu-boy.com/2023/01/ring-buffer-queue-with-fixed-size-in-golang/)\n- [example53](./example53-container-base-image-updates/) A container-based solution for automating Docker container base image updates. [Chinese Blog](https://blog.wu-boy.com/2023/02/automating-docker-container-base-image-updates-cht/), [English Blog](https://blog.wu-boy.com/2023/02/automating-docker-container-base-image-updates-eng/)\n- [exmaple54](./example54-hot-reload-for-development) introduction live reload tool: air [Chinese Blog](https://blog.wu-boy.com/2023/10/live-reload-in-go/)\n- [example55](./example55-cache-hotspot-invalid/) how to invalidate cache hotspot in golang. [Chinese Blog](https://blog.wu-boy.com/2024/02/how-to-reslove-the-hotspot-invalid-using-singleflight/), [English Blog](https://blog.wu-boy.com/2024/02/how-to-reslove-the-hotspot-invalid-using-singleflight-en/)\n- [example56](./example56-context-with-timeout/) how to use context with timeout in golang. [Chinese Blog](https://blog.wu-boy.com/2024/11/learning-go-language-with-gitlab-api-zh-tw/), [English Blog](https://blog.wu-boy.com/2024/11/learning-go-language-with-gitlab-api-en/) [Chinese Video](https://www.youtube.com/watch?v=nPn-pnOz7qc)\n\n[1]: https://github.com/golang/lint\n[2]: https://golang.org/cmd/gofmt/\n[3]: https://golang.org/doc/code.html#Library\n[4]: https://github.com/gin-gonic/gin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-training%2Ftraining","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-training%2Ftraining","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-training%2Ftraining/lists"}