Fix 'cannot find package' by adding Go's bin directory to your PATH environment variable.
The error occurs because your shell does not know where the Go binary is located after installation. Add Go's bin directory to your PATH environment variable and restart your terminal.
export PATH=$PATH:/usr/local/go/bin
To make this change permanent, add the line above to your shell configuration file (e.g., ~/.bashrc, ~/.zshrc, or ~/.profile).
Your computer doesn't know where to find the Go program because it's not in the list of folders your terminal checks by default. Adding the Go folder to your system's path is like putting a shortcut on your desktop so you can find the app instantly without searching the whole house.