Error when opening multiple folders

Every time I do any project with more than one folder an error appears.
I’ve already reviewed it and there’s nothing wrong with the code itself and I’m not using any modules or anything like that because it wasn’t necessary for such a simple code.
Someone knows how to fix it?

Try changing the folder name from [1 → 01user] or something and if it doesn’t work, try reinstalling GO.

You need to open one folder with main at a time. Not the root where you store all your subfolders. If you create submodules in folder in addition to main, use go mod init <name of your module> so go can understand that you are developing your project

Start here:

… here:

… and here:

If the code really is so simple it doesn’t require a module, it probably doesn’t require multiple packages.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.