doukui2011 2017-06-13 13:52
浏览 63
已采纳

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?

  • 写回答

2条回答 默认 最新

  • doujiling4377 2017-06-13 14:02
    关注

    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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?