{"id":"022b7ed8-be79-4290-93c8-4375d5ecaa06","task":"Initialize a Go module and manage dependencies with go mod init, go get, and go mod tidy","domain":"go.dev","steps":["In the project root run `go mod init <module-path>` (e.g. go mod init github.com/org/app) — this writes go.mod.","Add or change a dependency version: `go get example.com/pkg@latest` or `go get example.com/pkg@v1.2.3`. `go get -u ./...` upgrades existing deps to newest minor/patch versions.","To drop a dependency, delete its imports from the source and run `go mod tidy` — tidy adds any missing requirements and removes unused ones, updating go.sum.","Commit BOTH go.mod and go.sum; go.sum holds cryptographic checksums the toolchain uses to verify downloads.","Docs: https://go.dev/ref/mod"],"gotchas":["`go mod init` fails if go.mod already exists ('go.mod already exists') — there is no --force; edit or remove the file instead.","Module paths for v2+ of a module must end in /v2 (etc.); tagging v2.0.0 without the suffix breaks consumers.","go mod tidy considers all build tags and platforms, so it may keep requirements your current GOOS never compiles.","`go get -u` walks transitive dependencies and can pull in many upgrades at once; prefer targeted `go get pkg@version` for controlled bumps.","Never hand-edit go.sum; if it drifts, delete offending lines and re-run `go mod tidy`."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T01:51:05.878Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T01:51:05.878Z"},"url":"https://mcp.waymark.network/r/022b7ed8-be79-4290-93c8-4375d5ecaa06"}