問題タブ [gopath]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
go - 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!
go - 「go get」コマンドが失敗する: 認識されないインポート パス "_/"
基本的に、私の質問は、なぜインポートパスの前にアンダースコアを付けているのですか?
アンダーimport path does not begin with hostnameスコアで始まるためだと思います。
これはGOPATHを台無しにしたことに関係している可能性があるどこかを読みましたが、プロジェクトフォルダー内、プロジェクトフォルダー外、デフォルトの場所など、どこにでも移動しようとしました.
私は行くのが初めてで、これは最近数回出てきました。ガイダンスをいただければ幸いです。