dongxin991209 2018-02-06 04:47
浏览 15
已采纳

目录中的代码需要导入

I have a package which is forked from a repository myproject. Inside the project, I want to use some functions from sha3 package, however, I need to first add a go file to sha3 package which contains some extra functionalities. I want to include this custom sha3 package inside my project. I copied and pasted the sha3 directory into myproject directory, and inside my go codes, I imported sha3 package as: import . "github.com/myproject/sha3". Now, when I try to build myproject package, I am getting: code in directory /src/github.com/myproject/sha3 expects import "golang.org/x/crypto/sha3". I cannot understand what the problem is. I checked all the go files inside sha3 directory and none of them requires any import!

  • 写回答

1条回答 默认 最新

  • duanqiao3608 2018-02-06 05:11
    关注

    line number 66 sha3/docs.go has the import comment.

    import "golang.org/x/crypto/sha3"
    

    You can get rid of the build error by removing that.

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

报告相同问题?

悬赏问题

  • ¥15 关于#.net#的问题:End Function
  • ¥50 用AT89C52单片机设计一个温度测量与控制电路
  • ¥15 无法import pycausal
  • ¥15 VS2022创建MVC framework提示:预安装的程序包具有对缺少的注册表值的引用
  • ¥15 weditor无法连接模拟器Local server not started, start with?
  • ¥20 6-3 String类定义
  • ¥15 嵌入式--定时器使用
  • ¥20 51单片机学习中的问题
  • ¥30 Windows Server 2016利用兩張網卡處理兩個不同網絡
  • ¥15 Python中knn问题