update_go_version

Update Go version references across go.mod, Dockerfiles, and Nix tooling.

2.0k|126|Updated Jun 16, 2020
One-click install
npx skills add https://github.com/authgear/authgear-server --skill update-go-version
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update_go_version
Source: https://github.com/authgear/authgear-server/tree/main/.claude/skills/update_go_version
Command: npx skills add https://github.com/authgear/authgear-server --skill update-go-version

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeps every Go version reference in sync across Go modules, Dockerfiles, and tooling to avoid subtle drift and build failures after a Go upgrade.

Core Features & Use Cases

  • Consistent version updates: Walk through each go.mod, Dockerfile, and related configuration file to apply the exact new Go version so no module lags behind.
  • Supporting tooling refreshes: Update the Nix hash with nix store prefetch-file, rerun make go-mod-tidy, and rebuild the once-derived Dockerfile to ensure tooling matches the new version.
  • Use Case: When upgrading to a new Go release, follow this workflow to update every project area from custombuild to e2e modules, keeping the repo buildable end to end.

Quick Start

Update the Go version across all related files and regenerate the required hashes and tidy outputs as described.

Frequently Asked Questions about update_go_version

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update the Go version across all modules and Dockerfiles in a repository?

To update the Go version across a repository, you must synchronize every go.mod file, Dockerfile, and Nix configuration by applying the exact new version string to prevent module drift and build failures.

Why do my builds fail after upgrading the Go toolchain in my monorepo?

Builds fail after a Go upgrade because of subtle version drift across modules and tooling. Updating only some files leaves Dockerfiles and Nix tooling referencing the old version, causing mismatches and broken builds.

What's the best way to regenerate Nix hashes when changing the Go version?

The best way to regenerate Nix hashes when changing the Go version is to run `nix store prefetch-file` to update the derived hash, ensuring the Nix tooling matches the newly specified Go release.

Do I need to run go-mod-tidy after updating the Go version in go.mod files?

Yes, you need to run `make go-mod-tidy` after updating the Go version in go.mod files to ensure module dependencies are correctly resolved and synchronized with the new toolchain version.

Can I update the Go version in a repository using Docker and Nix together?

Yes, you can update the Go version using Docker and Nix together by adjusting the Dockerfile toolchain, updating the Nix configuration, regenerating the Nix hash, and validating the Dockerfile rebuild end to end.

What are the limitations of manually updating Go module versions without syncing tooling?

Manually updating Go module versions without syncing tooling leads to subtle drift where some modules lag behind, causing inconsistent builds and runtime failures across different project areas like custombuild and e2e modules.