nsmithuk / local-kms

A mock version of AWS' Key Management Service, for local development and testing.
MIT License
198 stars 34 forks source link

Proposal: Upgrade to Go Modules #17

Closed leighmcculloch closed 4 years ago

leighmcculloch commented 4 years ago

When I run this command locally I get a compile error:

$ go get -u github.com/nsmithuk/local-kms
# github.com/nsmithuk/local-kms/src/handler
../go/src/github.com/nsmithuk/local-kms/src/handler/create_key.go:24:21: multiple-value uuid.NewV4() in single-value context

It looks like this package is using an old package manager and requires use of dep ensure.

Migrating to Go Modules would make it easier to use and develop on this tool using standard Go tools.

If I checkout the code and initialize the Go module with the below commands, code compiles fine:

$ git clone https://github.com/nsmithuk/local-kms
$ cd local-kms
$ go mod init github.com/nsmithuk/local-kms
go: creating new go.mod: module github.com/nsmithuk/local-kms
go: copying requirements from Gopkg.lock
$ go mod tidy
...
$ go run .
INFO[2020-07-10 13:50:00.644] No file found at path /init/seed.yaml; skipping seeding.
INFO[2020-07-10 13:50:00.644] Data will be stored in /tmp/local-kms
INFO[2020-07-10 13:50:00.645] Local KMS started on 0.0.0.0:8080
leighmcculloch commented 4 years ago

@nsmithuk What do you think, are you up for upgrading to Go Modules? I've opened #18 if so.

nsmithuk commented 4 years ago

Hi @leighmcculloch. Yes, this looks great. I'll have chance to review your PR this coming weekend and get it merged.