No description
Find a file
Mikael Martinsen b5a7e9adc4
All checks were successful
/ test (push) Successful in 7s
pass even if fails
2026-01-25 20:39:48 +02:00
.forgejo/workflows pass even if fails 2026-01-25 20:39:48 +02:00
modules init 2026-01-15 21:59:01 +02:00
projects init 2026-01-15 21:59:01 +02:00
.dockerignore wip 2026-01-19 13:17:22 +02:00
.gitignore init 2026-01-15 21:59:01 +02:00
go.mod init 2026-01-15 21:59:01 +02:00
mise.toml wip 2026-01-19 13:17:22 +02:00
README.md wip 2026-01-19 13:17:22 +02:00
STRUCTURE.md init 2026-01-15 21:59:01 +02:00

Go Course Template

This repository provides a structured template for Go course modules, sections, tasks, and projects.

Repository Structure

go-course/
├── modules/           # Course modules organized by topic
│   └── module-01-basics/
│       ├── README.md
│       └── section-01-hello-world/
│           ├── README.md
│           └── task-01/
│               ├── main.go        # Task implementation file
│               └── main_test.go   # Test file
├── projects/          # Larger project-based assignments
└── solutions/        # Reference solutions (gitignored)

Usage

This template is designed to work with the Go Course CLI tool. The CLI will:

  • Guide you to the correct task
  • Watch for file changes
  • Run tests automatically

Development

Each task contains:

  • Boilerplate code with function signatures to implement
  • Test files that validate your implementation
  • Comments explaining what needs to be done

Course Content

The course is organized into:

  1. Modules: Major topics (e.g., Basics, Control Flow, Functions)
  2. Sections: Subtopics within modules (e.g., Hello World, Variables)
  3. Tasks: Individual coding exercises
  4. Projects: Larger, multi-file assignments

Running Tests

Run tests for a specific task:

go test -count=1 ./modules/module-01-basics/section-01-hello-world/task-01

Docker Test Watcher

A Docker image is available that provides automatic test watching. See DOCKER_WATCHER.md for details.

Quick start:

./build-docker.sh
docker run -it --rm -v $(pwd):/workspace go-course-watch modules/module-01-basics/section-01-hello-world/task-01

Contributing

Follow the existing structure when adding new content:

  • Use descriptive names for modules and sections
  • Provide clear instructions in README files
  • Ensure all tasks have corresponding tests
  • Include boilerplate code with function signatures