Mar 26, 2018 · 2 min read

Did you update to go 1.10? DId you update to CircleCI 2.0 ?
A month ago, go 1.10 released. It includes awesome feature, build cache.

On the other hand, CircleCI 1.0 EOL announced on August 31, 2018.

You should migrate 1.0 to 2.0.
On my production code, build time faster 4x by updating go 1.10 and CircleCI 2.0.


  • use CircleCI build cache
  • use dep
  • use test cache

use CircleCI build cache

In CircleCI 2.0, you can save and restore cache any path in your repositories at your any timing.

use dep

dep is dependency management tool for Go. Currently dep may defact standard. dep download dependency libraries to vendor directory. So, with CircleCI build cache you can skip download step efficiently.

here is example circle.yml:

download-libraries phase only executed first push per branch, or Gopkg.lock changed.

use test cache

To enable go 1.10 test cache needs just technique. CircleCI build cache write only once.

The cache for a specific key is immutable and cannot be changed once written. NOTE: If the cache for the given key already exists it won’t be modified, and job execution will proceed to the next step.

On restore cache, use CIRCLE_PREVIOUS_BUILD_NUM environment variable. it restore previous build cache. And save_cache phase, you use CIRCLE_BUILD_NUM environment variable.


On CircleCI 1.0 and go 1.9


On CircleCI 2.0 and go 1.10 (no test cache)


On CircleCI 2.0 and go 1.10 (with test cache via rebuild)


Thanks, reading!


misc tech

Tech tips. It might help you.


Written by


programmer, angler, podcaster

misc tech

misc tech

Tech tips. It might help you.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade