{"id":13620256,"url":"https://github.com/mauricioabreu/golings","last_synced_at":"2025-04-04T20:16:20.261Z","repository":{"id":62316830,"uuid":"558010494","full_name":"mauricioabreu/golings","owner":"mauricioabreu","description":"rustlings but for golang this time","archived":false,"fork":false,"pushed_at":"2024-04-10T11:46:08.000Z","size":230,"stargazers_count":453,"open_issues_count":2,"forks_count":58,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-17T22:17:48.845Z","etag":null,"topics":["beginner-friendly","golang","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mauricioabreu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2022-10-26T18:16:56.000Z","updated_at":"2024-05-30T03:15:17.963Z","dependencies_parsed_at":"2023-02-08T16:30:25.926Z","dependency_job_id":"b867d71a-2673-4d6f-b922-41475a70941d","html_url":"https://github.com/mauricioabreu/golings","commit_stats":{"total_commits":117,"total_committers":3,"mean_commits":39.0,"dds":"0.017094017094017144","last_synced_commit":"df50f8add60c7dda9b8090f8f2120301a720227c"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricioabreu%2Fgolings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricioabreu%2Fgolings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricioabreu%2Fgolings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mauricioabreu%2Fgolings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mauricioabreu","download_url":"https://codeload.github.com/mauricioabreu/golings/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242681,"owners_count":20907134,"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":["beginner-friendly","golang","tutorial"],"created_at":"2024-08-01T21:00:53.852Z","updated_at":"2025-04-04T20:16:20.228Z","avatar_url":"https://github.com/mauricioabreu.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# golings\n\n[![build and test](https://github.com/mauricioabreu/golings/actions/workflows/test.yml/badge.svg)](https://github.com/mauricioabreu/golings/actions/workflows/test.yml)\n\n![gopher](misc/gopher-dance.gif)\n\n\u003e rustlings but for golang this time\n\nYou may know [rustlings](https://github.com/rust-lang/rustlings), right? If you don't, please go ahead and check out.\n`rustlings` is awesome. It is a CLI app designed to teach the awesome Rust programming language through exercises.\n\n`golings` has the very same idea, but for the [Go programming language](https://go.dev/)\n\nAfter setting up all the tools required to run `golings` you have the task to fix tiny go programs.\n\n## Installing\n\nFirst, you need to have `go` installed. You can install it by visiting the [Go downloads page](https://go.dev/dl/)\n\nThere are several ways to install `golings`\n\n### Option 1: GO install\n\n```sh\ngo install github.com/mauricioabreu/golings/golings@latest\n```\n\nAdd `go/bin` to your PATH if you want to run golings anywhere in your terminal. From the official docs:\n\n\u003e The install directory is controlled by the GOPATH and GOBIN environment variables. If GOBIN is set, binaries are installed to that directory. If GOPATH is set, binaries are installed to the bin subdirectory of the first directory in the GOPATH list. Otherwise, binaries are installed to the bin subdirectory of the default GOPATH ($HOME/go or %USERPROFILE%\\go).\n\n#### Windows installation\n\nSome tests depend on `CGO` which is not installed by default.\n\n1. Install scoop package manager [Scoop Homepage](https://scoop.sh)\n    ```powershell\n    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser\n    Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression\n    ```\n1. Install MINGW using scoop\n    ```powershell\n    scoop install mingw\n    ```\n1. Close the Powershell session\n\n\n### Option 2: Binaries\n\nGo to the [releases page](https://github.com/mauricioabreu/golings/releases) and choose the option that best fits your environment.\n\n### Option 3: Web version (playground)\n\n[@Grubba27](https://github.com/Grubba27/) worked hard to create a web version: https://golings.vercel.app/\n\nIt's pretty awesome and uses the playground so you can play with the exercises without installing anything.\n\n### Option 4: DevContainer\n\n1. Install Docker/Podman \u0026 VSCode \u0026 Configure\n1. Clone the repository and open it in VSCode.\n1. You will be prompted to reopen the code in a devcontainer. The container is pre-configured with go and all of the tools needed to debug go code.\n1. Open a new embeded terminal and run `golings watch` to start the exercises.\n\n## Doing exercises\n\nAll the exercises can be found in the directory `golings/exercises/\u003ctopic\u003e`. For every topic there is an additional README file with some resources to get you started on the topic. We really recommend that you have a look at them before you start.\n\nNow you have the task to fix all the programs. Some of them don't compile, and you need to fix them. Some of them compile, but have tests and you need to write some code to have them all green (these are the `compile` and `test` modes).\n\nClone the repository:\n\n```sh\ngit clone git@github.com:mauricioabreu/golings.git\n```\n\nTo run the exercises in the recommended order while taking advantage of fast feedback loop, use the _watch_ command:\n\n```sh\ngolings watch\n```\n\nFor Windows:\n```powershell\n$env:CGO_ENABLED=1\ngolings watch\n```\n\nThis command will run golings in interactive mode. Every time you save a file it will verify if the code is correct.\n\nTo run the next pending exercise:\n\n```sh\ngolings run next\n```\n\nIf you want to run a single exercise:\n\n```sh\ngolings run variables1\n```\n\nIn case you are stuck and need a hint:\n\n```sh\ngolings hint variables1\n```\n\nTo list all exercise while checking your progress:\n\n```sh\ngolings list\n```\n\nTo compile and run all the exercises:\n\n```sh\ngolings verify\n```\n\nIf you need help with CLI commands:\n\n```sh\ngolings --help\n```\n\nA demo running the command `golings run \u003cexercise name\u003e`\n\n![demo](misc/demo.gif)\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md)\n\n## Learning resources\n\n* [Golang official tutorial](https://go.dev/doc/tutorial/)\n* [Go by example](https://gobyexample.com)\n* [Aprenda Go](https://www.youtube.com/playlist?list=PLCKpcjBB_VlBsxJ9IseNxFllf-UFEXOdg)\n\n## Other 'lings\n\n* [rustlings](https://github.com/rust-lang/rustlings)\n* [ziglings](https://github.com/ratfactor/ziglings)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauricioabreu%2Fgolings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmauricioabreu%2Fgolings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmauricioabreu%2Fgolings/lists"}