Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

go

> DevOps
Open source

Exercism exercises in Go.

135.7K stars0 likes11 views
WebsiteGitHub

About

Exercism exercises in Go.

Exercism Go Track

Exercism exercises in Go. Issues/Feedback

⚠️ Please be aware that this repository currently does not accept community contributions. This blog post explains the details.

If you have any feedback or experience problems, you can bring them up in the Go section of the Exercism forum. Development setup

If you work on this repository, you should follow some standard Go development practices. You should have a recent version of Go installed, ideally either the current release or previous release.

You will need a github account and you will need to fork exercism/go to your account. See GitHub Help if you are unfamiliar with the process. Clone your fork with the command: git clone https://github.com/<you>/go. Test your clone by cding to the go directory and typing bin/fetch-golangci-lint and then bin/run-tests. You should see tests pass for all exercises.

Note that unlike most other Go code, it is not necessary to clone this to your GOPATH. This is because this repo only imports from the standard library and isn't expected to be imported by other packages.

Your Go code should be formatted using the gofmt tool.

There is a misspelling tool. You can install and occasionally run it to find low hanging typo problems. 570 It's not added into CI since it could give false positives. Contributing Guide

Please be familiar with the contributing guide in the docs repository. This describes some great ways to get involved. In particular, please read the Pull Request Guidelines before opening a pull request. Exercism Go style

Let's walk through an example, non-existent, exercise, which we'll call fizzbuzz to see what could be included in its implementation. Exercise configuration

An exercise is configured via an entry in the exercises array in config.json file. If fizzbuzz is an optional exercise, it would have an entry below the core exercises that might look like:

See Exercism Docs: config.json for more info. Exercise files: Overview

For any exercise you may see a number of files present in a directory under exercises/:

This list of files can vary across exercises. Not all exercises use all of these files. Exercises originate their test data and README text from the Exercism problem-specification repository. This repository collects common information for all exercises across all tracks. However, should track-specific documentation need to be included with the exercise, files in an exercise's .meta/ directory can be used to override or augment the exercise's README.

Let's briefly describe each file:

  • cases_test.go - Contains generated test cases, using test data sourced from the problem-specifications repository. Only in some exercises. Automatically generated by .meta/gen.go.

  • example.go - An example solution for the exercise used to verify the test suite. Ignored by the exercism fetch command. See also ignored files.

  • fizzbuzz.go - A stub file, in some early exercises to give users a starting point.

  • fizzbuzz_test.go - The main test file for the exercise.

  • go.mod - The Go module file. This should be automatically generated by the generator code.

  • .meta/ - Contains files not to be included when a user fetches an exercise. See also ignored files.

  • .meta/description.md - Use to generate a track specific description of the exercise in the exercise's README.

  • .meta/gen.go - Generates cases_test.go when present. See also synchronizing exercises with problem specifications.

  • .meta/hints.md - Use to add track specific information in addition to the generic exercise's problem-specification description in the README.

  • .meta/metadata.yml - Track specific exercise metadata, overrides the exercise metadata from the problem-specifications repository.

In some exercises there can be extra files, for instance the series exercise contains extra test files. Ignored files

When a user fetches an exercise, they do not need to get all the files within an exercise directory. For instance; the example.go files that contain an example solution, or the gen.go files used to generate an exercise's test cases. Therefore there are certain files and directories that are ignored when an exercise is fetched. These are:

  • The .meta directory and anything within it.
  • Any file that matches the ignore_pattern defined in config.json file. This currently matches any filename that contains the word example, unless it is followed

Issues· 23 open

View all issuesOpen on GitHub
  • #2183

    Implement New Concept Exercise: String Builder

    x:action/createx:knowledge/intermediatex:module/conceptx:module/concept-exercisex:type/contentUpdated Sep 26, 2026
  • #2204

    Concept Regular Expressions: Add some more details

    x:action/improvex:knowledge/nonex:module/conceptx:type/contentx:rep/smallUpdated Sep 24, 2026
  • #3170

    We're translating this repository to other languages

    Updated Sep 22, 2026
  • #3042

    Review existing concepts

    Updated Apr 28, 2026
  • #1391

    Implement new Concept Exercise: time-duration

    x:action/createx:knowledge/intermediatex:module/concept-exercisex:status/claimedx:type/contentUpdated Apr 20, 2026
  • #1574

    numbers concept: improve about.md and introduction.md

    x:action/improvex:knowledge/nonex:module/conceptx:type/contentx:size/smallUpdated Aug 11, 2025
  • #2182

    Implement New Concept Exercise: Channels and Select

    x:action/createx:knowledge/intermediatex:module/conceptx:module/concept-exercisex:type/contentUpdated Jun 18, 2025
  • #2185

    Implement New Concept Exercise: Bitwise Operators

    x:action/createx:knowledge/intermediatex:module/conceptx:module/concept-exercisex:type/contentUpdated Nov 9, 2024
  • #2645

    Adding concurrency concepts to the syllabus

    x:rep/mediumUpdated Aug 29, 2023
  • #2492

    Improve learning experience for interfaces, errors and error wrapping

    x:rep/mediumUpdated Jun 26, 2023

> Tags

Gocommunity-contributions-pausedexercism-trackmaintained-autonomous

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理