GUID tests to use t.Run (#256)

Switched to subtests using `t.Run()` for GUID testing, rather than using
log statements to demarcate different tests.

Added `.String` to GUID `Variant` and `Version` using
`golang.org/x/tools/cmd/stringer`.

Added `tools.go` to version `stringer` in go.mod and allow
`go generate ./...` to be run without needing a `go get` call.
Based off of [go wiki](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module)
recommendation.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
This commit is contained in:
Hamza El-Saawy
2022-08-29 16:27:34 -04:00
committed by GitHub
parent ebbecbd9b5
commit 376b2013fe
6 changed files with 103 additions and 35 deletions
+3 -2
View File
@@ -4,7 +4,8 @@ go 1.17
require (
github.com/sirupsen/logrus v1.7.0
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
golang.org/x/tools v0.1.12
)
require golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
require golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect