Set the minimum Go version in go.mod.

Section: Editing and Replacements

Set go line

bash
bash
go mod edit -go=1.25
Explanation

Set the minimum Go version in go.mod. Useful in Go CLI workflows.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Editing and Replacements
Add replace directive
Point a module dependency to a local checkout.
OpenIn sheetbashsame section
Add require directive
Add an explicit module requirement.
OpenIn sheetbashsame section
Vendor dependencies
Copy dependencies into a vendor directory.
OpenIn sheetbashsame section
Inspect current module JSON
Inspect current module metadata.
OpenIn sheetbashsame section
Initialize module
Create a new go.mod for the current project.
OpenIn sheetbash2 tag match
Tidy dependencies
Add missing and remove unused module requirements.
OpenIn sheetbash2 tag match