我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

在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

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.

近期文章

  • golang为类型为map [string] interface {}的对象设置新值
  • Testify Suite中SetupSuite和SetupTest之间的区别
  • 为什么当类型实现接口时,行为会有所不同?
  • 如何读取大型CSV文件
  • 仅更新golang中的非空结构字段
  • Golang解析数组
  • 服务器和客户端之间的明显死锁
  • 使用反射设置nil * int32结构域
  • 在Google Go中使用Olivere / Elastic在ElasticSearch中通过查询更新记录
  • 用单元测试覆盖主要功能中的代码
  • 在生产中部署Golang(Beego)
  • 通过FTP下载文件后将文件写入磁盘时出现问题
  • 如何使用golang在mongodb中插入用户信息?
  • 是否可以将git diff与go-git等效
  • RSA密钥导出和导入
  • 在函数中附加要切片的项不会更改原始切片
  • 如何使用模板组织Golang WebApp? [重复]
  • 一次处理多个GET请求
  • 如何从客户端发送grpc元数据
  • 如何在“漂亮”的文本中查看mgo的bson.Raw

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华