I recommend going through the following path, using official documentation pages:
- Read about properly installing Go for your platform
- Read the getting started tutorial which also tells you how to install 3rd-party packages and use them in your code.
It should take you no more than 20 minutes to go through these steps, and it's almost certain that you'll be able to accomplish your goal by the end of the process. As a bonus, keep going through the Getting Started guide beyond the first page to learn how to create your own Go modules, use them from other modules, write tests, build your code into a binary, and more.
This is IMHO the minimal background required to even try writing Go programs; without going through these steps, you will lack crucial fundamental understanding and it will be hard to even understand SO answers.
If problems still persist, feel free to update the question but provide more details: how are your go env vars set up (output of go env), are you using modules (you should!), how does your module directory look, etc.