google / fswalker

Simple file system integrity checking tooling.
https://google.github.io/fswalker/
Apache License 2.0
102 stars 12 forks source link

Use Go modules #5

Closed x1ddos closed 5 years ago

x1ddos commented 5 years ago

Mainly followed examples in https://blog.golang.org/using-go-modules and ran go init. Then:

$ go test ./...
go: finding github.com/google/uuid v1.1.1
go: finding github.com/google/go-cmp/cmp latest
go: finding github.com/golang/protobuf/proto latest
go: finding github.com/golang/protobuf/ptypes latest
go: finding github.com/golang/protobuf/ptypes/timestamp latest
go: downloading github.com/google/uuid v1.1.1
go: extracting github.com/google/uuid v1.1.1
go: finding github.com/google/go-cmp v0.3.0
go: downloading github.com/google/go-cmp v0.3.0
go: extracting github.com/google/go-cmp v0.3.0
go: finding github.com/golang/protobuf v1.3.1
go: downloading github.com/golang/protobuf v1.3.1
go: extracting github.com/golang/protobuf v1.3.1
Loaded file "/tmp/walk.pb786717516" with fingerprint: SHA256(da1b6acdb779c05f4dec6ad7ca8d6b3d32267d285a719888690272b2ce9c1734)

ok      github.com/google/fswalker  0.031s
?       github.com/google/fswalker/cmd/reporter [no test files]
?       github.com/google/fswalker/cmd/walker   [no test files]
ok      github.com/google/fswalker/internal/metrics 0.012s
?       github.com/google/fswalker/proto/fswalker   [no test files]

$ go list -m all
github.com/google/fswalker
github.com/golang/protobuf v1.3.1
github.com/google/go-cmp v0.3.0
github.com/google/uuid v1.1.1

This also updates Travis CI config to use the last 2 version of Go releases apart from the tip.

To use modules locally while inside GOPATH dir, set GO111MODULE env variable to on.

We might want to tag this with something like "v0.0.1" to mark the start of Go modules support.