doujiyun0041 2018-03-24 13:22
浏览 577
已采纳

在Golang中的模块中找不到用法

I'm using struct from subpackage and it works. But on find usage of this structure IDEA doesn't see usages. The same situation on rename for the structure - IDEA renames the original structure and doesn't rename it in all places of usage. How can I fix it, because I don't want to put all go files only in one package.

enter image description here

  • 写回答

1条回答 默认 最新

  • duanpacan2583 2018-03-24 13:58
    关注

    go project directory like this.

    projectname:
      bin/
      src/
         structs/
            custom_types.go
         main.go
      pkg/
    

    Use go build command will auto create bin/pkg directory. src directory contains all go source files.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?