Private modules

Configure private Go modules by setting the GOPRIVATE environment variable to bypass the public proxy for specific import paths.

Private modules are Go packages that cannot be accessed by other modules unless explicitly allowed via the GOPRIVATE environment variable or go.mod directives. To configure private modules, set the GOPRIVATE environment variable to include the import paths of your private repositories, ensuring the Go toolchain bypasses the public proxy for those paths. For example, add GOPRIVATE=example.com/private/* to your shell configuration or run go env -w GOPRIVATE=example.com/private/* to set it for your current session.