[Golang] How about modules (formerly known as vgo) support?

Hello,

I’ve been using Travis-CI for all my #Golang builds for quite some time. As my projects evolve, I have to manually add new modules in the .travis.yml file all the time. Now that Go 1.11 due later this month will have real module support, isn’t it time to add modules (formerly known as vgo) to the #Golang part of Travis?

There are a few ways to do it:

  • use 1.11 onward, it should work as-as and fetch modules during the build
  • for older versions, I’d maybe add a vgo: true or similar to get the same behaviour.

Idea, comment?

1 Like

Ok, thanks to the folks on Slack in #modules, I’ve been pointed to This article by Dave Cheney. If I were to stop supporting 1.10 in my builds I could do away with the install: section and rely on module support. That’s because I never tried to use dep before hence I do not have the Gopkg.toml/.lock that remove the need of install:. Oh well.

1 Like

Awesome! Yeah, Dave’s article looks right for sure. As to the install: section - you could try evaluating it only if the go version is 1.10 (conditions would be helpful here).

In any event, I’ll check with the go folks here and see where we are on module support!

1 Like