Skip to content

📘️ Learn Go by fixing tiny incorrect programs

License

Notifications You must be signed in to change notification settings

artyom-morozov/gopherlings

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gopherlings

📘️ Learn Go by fixing tiny incorrect programs

This project was directly inspired by the great ziglings project which itself was inspired by rustlings.

For a first time learner it is suggested you complement this material with another source such as

Intended Audience

These exercises will probably be difficult if you've never programmed before.

The exercises should be self-contained and self-explained, though this is a WIP and suggestions are welcome!

Instructions: Running exercises

Requires a Go installation to run the examples.

Instructions using VSCode

  1. Download the repository (or alternatively clone it)

  2. Install the VSCode Go extension authored by Go Team at Google

  3. Open the gopherlings folder in VSCode

  4. Navigate to the exercise file, i.e. exercises/001-hello/hello.go

  5. Once the hello.go file is open you may edit it and press F5 to run it. Output will be shown in the Debug Console.

Instructions using terminal

  1. Clone repository

    git clone https://github.com/soypat/gopherlings.git 
  2. Navigate to example's directory

    cd gopherlings/exercises/001-hello
  3. Edit the file so it is correct and run it with go run

    go run hello.go

    Optionally, instead of step 3, use air to auto reload your code after you save your code. Then you will see your code output without any action. You can simply focus on your code.

    go install github.com/cosmtrek/air@latest
    air

Roadmap

Short term

  • Add quizzes after $n$ exercises.
    • Possibly add several quizzes of varying difficulty inside quiz directory.
  • Add a helper program.
    • Could run most recently edited exercise and lead the coder in right direction.
    • Could yield hints when coder requests it.

Long term

  • Have exercises that cover the entire Go spec.

About

📘️ Learn Go by fixing tiny incorrect programs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%