Go CLI Modules and Workspaces/Inspect current module JSON

Inspect current module metadata.

Section: Editing and Replacements

Inspect current module JSON

bash
bash
go list -m -json
Explanation

Inspect current module metadata. 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
Set go line
Set the minimum Go version in go.mod.
OpenIn sheetbashsame section
Vendor dependencies
Copy dependencies into a vendor directory.
OpenIn sheetbashsame section
List available updates
Show modules that have newer versions available.
OpenIn sheetbash2 tag match
Initialize module
Create a new go.mod for the current project.
OpenIn sheetbash1 tag match