A Hello World application written in Go, designed for GitHub Codespaces development.
This is a simple Hello World application that demonstrates Go development setup with unit tests, linting, and debugging capabilities. The project is configured for use with GitHub Codespaces for an instant development environment.
- Go 1.25.5 or later
- (Optional) golangci-lint for code linting
To run the Hello World application:
go run main.goExpected output:
Hello, World!
To build an executable:
go build -o hello-world
./hello-worldTo run the unit tests:
go test -vTo run tests with coverage:
go test -v -coverTo generate a detailed coverage report:
go test -coverprofile=coverage.out
go tool cover -html=coverage.outThis repository is configured for GitHub Codespaces with the following features:
- Go 1.25.5 development environment
- VS Code Extensions:
- Go (golang.go) - Official Go extension with autocomplete and IntelliSense
- Live Share (ms-vsliveshare.vsliveshare) - Real-time collaborative development
- Atom Material Icons (Equinusocio.vsc-material-theme-icons) - File icons theme
- Material Product Icons (PKief.material-product-icons) - Product icons theme
- Catppuccin for VS Code (Catppuccin.catppuccin-vsc) - Color theme
- Code Runner (formulahendry.code-runner) - Run code snippets quickly
- Navigate to the repository on GitHub
- Click the "Code" button
- Select "Codespaces" tab
- Click "Create codespace on main" (or your branch)
The development environment will automatically:
- Install Go 1.25.5
- Download dependencies
- Install golangci-lint
- Configure autocomplete and IntelliSense
- Set up debug/run configurations
This project uses golangci-lint for code quality checks.
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latestgolangci-lint runThe linter configuration is in .golangci.yml and includes checks for:
- Code errors and bugs
- Code style and formatting
- Code complexity
- Security issues
- Common mistakes
VS Code launch configurations are provided in .vscode/launch.json:
- Launch Package - Run the entire package
- Debug Package - Debug the entire package with breakpoints
- Launch File - Run the currently open file
- Debug Test - Debug unit tests
To debug:
- Open the file you want to debug
- Set breakpoints by clicking left of the line numbers
- Press
F5or go to Run → Start Debugging - Select the appropriate launch configuration
.
├── .devcontainer/
│ └── devcontainer.json # GitHub Codespaces configuration
├── .vscode/
│ └── launch.json # Debug/run configurations
├── .gitignore # Git ignore rules
├── .golangci.yml # Linter configuration
├── go.mod # Go module definition
├── main.go # Main application
├── main_test.go # Unit tests
├── LICENSE # MIT License
└── README.md # This file
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 TerraformTestLab