5

https://github.com/monochromegane/the_platinum_searcher

上記のthe_platinum_searcherのREADMEを見ると、インストール方法として下記のように記載されていました。

$ go get -u github.com/monochromegane/the_platinum_searcher/...

...を省くとbinにptがインストールされませんでした。この...はどういった役割なのでしょうか?

user3270390
  • 1,088
  • 3
  • 17
  • 34
  • go help packages を実行すると、An import path is a pattern if it includes one or more "..." wildcards, each of which can match any string, including the empty string and strings containing slashes. Such a pattern expands to all package directories found in the GOPATH trees with names matching the patterns. と説明されています。 –  Jan 07 '18 at 12:47

2 Answers2

7

ワイルドカードの事ではないでしょうか。

go - The Go Programming Language > Goコマンドでのパッケージリストについて

多くのコマンドが以下のように一連のパッケージに適用できます。

go action [packages]

通常、[packages]はインポートパスのリストです。
(中略)
インポートパスが1つ以上の"..."ワイルドカード(それぞれが空文字・スラッシュを伴う文字列を含む任意の文字列にマッチする)を含む場合、それらのパターンにマッチする名前を含むGOPATHツリーに存在するすべてのパッケージディレクトリに展開されます。

inasync
  • 414
  • 2
  • 4
0

カレントディレクトリ以下を再帰的に見に行きます