Webstorm Package Import Error

I’m having a bit of trouble importing the net/http package

Webstorm gives me the following error:

C:/Go/src/net’ has no buildable Go source files less… (Ctrl+F1)
This inspection highlights invalid imports.

The SDK path is set correctly and there’s nothing wrong with my code… I mean I only wrote

package main

And I’m getting a red line under what I’m importing

If you are using windows you must set GOROOT to the path you unpacked the go distribution.

You must also set GOPATH to the directory that contains all your go code. This cannot be the same as or a sub folder of GOROOT.

note: this advice is for windows only.

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