Go (Golang) setup on Windows
Go is a statically typed, concurrent, and garbage-collected programming language created at Google.
Wiki topics:
💻 · Programming
Go (Golang) setup on Windows
Go is a statically typed, concurrent, and garbage-collected programming language created at Google.
1. Download Go
- Visit the official Go website: https://go.dev/dl/
- Download the Windows installer (
.msi) for your system (e.g.,go<version>.windows-amd64.msi).
2. Install Go
- Run the downloaded
.msifile. - Follow the installation wizard:
- Accept the license agreement.
- Choose an installation location (default:
C:\Program Files\Go). - Click Next to install.
3. Set Environment Variables
The installer automatically sets the environment variables, but you can verify and update them manually:
- Open Environment Variables:
- Right-click on This PC → Properties → Advanced System Settings → Environment Variables.
2. Edit PATH:
- In System variables, find
Path→ Click Edit. - Ensure
C:\Program Files\Go\binis listed.
3. Set GOPATH:
- Add a new system variable:
- Name:
GOPATH - Value: A directory for your Go workspace (e.g.,
C:\Users\<YourUsername>\go).
4. Verify Installation
- Open Command Prompt or PowerShell.
- Check Go version:
go version
You should see the installed Go version, e.g., go version go1.21.0 windows/amd64.
5. Test Go Installation
- Create a new directory for your Go project:
mkdir go-hello-world
cd go-hello-world
- Create a file named
main.gowith the following content:
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
- Run the program:
go run main.go
You should see:
Hello, World!
6. Optional: Install an IDE
- Install an IDE like Visual Studio Code and the Go extension for better development experience.
메타데이터
- post_id
- fecb1d672f13
- slug
- go-golang-setup-on-windows-fecb1d672f13
- url
- https://medium.com/@sum3dh/go-golang-setup-on-windows-fecb1d672f13
- canonical_url
- https://medium.com/@sum3dh/go-golang-setup-on-windows-fecb1d672f13
- author_url
- https://medium.com/@sum3dh
- status
- ok
- fetched_at
- 2026-06-12 07:40:50