Fix

"module not found" in Go

Fix 'module not found' in Go by running go mod tidy to sync dependencies and update go.mod.

The error occurs because the Go toolchain cannot locate the module definition or the dependency is missing from your cache. Run go mod tidy in your project root to sync your go.mod and go.sum files with your imports and download missing dependencies.

go mod tidy

If the error persists, verify your GOPROXY and GOPRIVATE settings by running go env to ensure the toolchain can reach the module proxy.