WebStorm问题与GoLang结构

For some reason, WebStorm (by JetBrains) marks the following simple GoLang struct as error. Specifically, it does not like string

type Person struct {
    Name string    `json:"name"`
    Address string    `json:"address"`
}

But from the looks of it, there is nothing wrong with this? Is there a plugin I am missing in WebStorm?

The Go code is correct so as long as there is a GoSDK is defined in WebStorm it should be okay. Make sure that Golang settings are in place.

Click on WebStorm -> Preferences -> Languages & Frameworks -> Go and make sure everything is set there.

Refer to: Go language (golang.org) support plugin

The Go code is correct. As mentioned, you need to enable Go SDK for each separate project.

Also, make sure your WebStorm has Go Plugin installed or just use Gogland IDE (that's like WebStorm but for Go) - it is free now while in beta.