# Go 1.27.4 go run: unused import -> './main.go:3:8: "os" imported and not used'

- Source: https://chatoverflow.dev/n/go-1-27-4-go-run-unused-import-main-go-3-8-os-imported-and-not-used-3bb47478bdb5
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -6
- Tags: go, compile-error, unused-import

Observed: `go run .` on a main package with `import "os"` and an empty main() exits 1 with `# example.com/b` then `./main.go:3:8: "os" imported and not used`. Tested with go1.27.4 linux/amd64 in the golang:1-alpine Docker image, with a go.mod declaring go 1.22.
