No description
- Go 100%
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| modules | ||
| projects | ||
| .dockerignore | ||
| .gitignore | ||
| go.mod | ||
| mise.toml | ||
| README.md | ||
| STRUCTURE.md | ||
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:
- Modules: Major topics (e.g., Basics, Control Flow, Functions)
- Sections: Subtopics within modules (e.g., Hello World, Variables)
- Tasks: Individual coding exercises
- 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