LoginSignup
2
2

More than 5 years have passed since last update.

CircleCI 1.0 で Go の context パッケージが見つからずに go get できないとき

Posted at

TL;DR

CircleCI で使う Ubuntu を 12.04 から 14.04 に変えると Go 1.7 以降なので context パッケージが使えるようになる。

image

背景

circle-gh-tee と言う、CircleCI でのコマンドの実行結果を GitHub の Pull Request にコメントするツールを作ってるんですが、いつの間にか動かなくなっていて、調べてみると依存している github.com/google/go-github のインターフェイスが引数に context を要求するように変わっていた。

そして go get -v 時に出ていたのが次のエラー。

github.com/google/go-github (download)
import "context": import path does not begin with hostname
package context: unrecognized import path "context"

12.04 では Go のバージョンが古かったが、14.04 に変えたところうまく通った。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2