A23149577
A23149577

Reputation: 2145

Code in directory expects import

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!

Upvotes: 3

Views: 7466

Answers (1)

Anuruddha
Anuruddha

Reputation: 3245

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.

Upvotes: 7

Related Questions