0

I am looking at ways to manage Go modules and looking at AWS Codeartifact, I don't see an option for Go while creating repository.

How can we manage Go modules in AWS?

But found this in Google search, looks like GCP has support for Go modules. https://cloud.google.com/artifact-registry/docs/go

karthikeayan
  • 4,291
  • 7
  • 37
  • 75

1 Answers1

0

I find it easiest to use go's vendor tools which place all your modules in the vendor directory. This means your source code is portable and can be built without requiring the internet. Additionally you can manage private repo modules without doing GitHub access on your build pipeline.

For more documentation check out the vendor docs. https://go.dev/ref/mod

And here is a similar question what is the purpose of `go mod vendor` command?

  • Thank you for the answer, vendor directory is in developer's machine right? I am looking for a solutions that can work with CI pipelines as well. – karthikeayan Jun 13 '23 at 12:21
  • 1
    The vendors directory gets committed to your whole codebase and the compiler knows to look into vendor for all packages. So it works with CI too because it lives with the rest of your code. This also has the advantage Of speeding up build times because no downloads occur. – Brandon Martinez Jun 14 '23 at 18:31