diff --git a/core/build_vars.go b/core/build_vars.go index cb5a14e9bf..8a8d869730 100644 --- a/core/build_vars.go +++ b/core/build_vars.go @@ -26,13 +26,13 @@ import ( ) // GitCommit holds the latest git commit hash for this build. -var GitCommit string = "0" +var GitCommit = "0" // GitVersion holds the tagged version belonging to the git commit. var GitVersion string // GitBranch holds the branch from where the binary is built. -var GitBranch string = "development" +var GitBranch = "development" // Version gives the current version according to the git tag or the branch if there's no tag. func Version() string { diff --git a/discovery/store.go b/discovery/store.go index c86da5f898..ecac207569 100644 --- a/discovery/store.go +++ b/discovery/store.go @@ -24,7 +24,7 @@ import ( "github.com/google/uuid" "github.com/nuts-foundation/go-did/vc" "github.com/nuts-foundation/nuts-node/discovery/log" - credential "github.com/nuts-foundation/nuts-node/vcr/credential" + "github.com/nuts-foundation/nuts-node/vcr/credential" "gorm.io/driver/sqlite" "gorm.io/gorm" "gorm.io/gorm/clause" diff --git a/network/transport/grpc/util.go b/network/transport/grpc/util.go index 0b709fefb6..293da7e827 100644 --- a/network/transport/grpc/util.go +++ b/network/transport/grpc/util.go @@ -19,14 +19,12 @@ package grpc import ( - "context" "fmt" "github.com/nuts-foundation/go-did/did" "github.com/nuts-foundation/nuts-node/network/transport" "google.golang.org/grpc" "google.golang.org/grpc/metadata" "strings" - "time" ) func readMetadata(md metadata.MD) (transport.PeerID, did.DID, error) { @@ -71,10 +69,3 @@ func readMetadata(md metadata.MD) (transport.PeerID, did.DID, error) { func GetStreamMethod(serviceName string, stream grpc.StreamDesc) string { return fmt.Sprintf("/%s/%s", serviceName, stream.StreamName) } - -func sleepWithCancel(ctx context.Context, duration time.Duration) { - select { - case <-ctx.Done(): - case <-time.After(duration): - } -} diff --git a/pki/denylist_test.go b/pki/denylist_test.go index fe715ed943..2b6e9bea27 100644 --- a/pki/denylist_test.go +++ b/pki/denylist_test.go @@ -128,37 +128,37 @@ func denylistTestServer(denylist string) *httptest.Server { func trustedDenylist(t *testing.T) string { // Build the denylist contents entries := []denylistEntry{ - denylistEntry{ + { Issuer: `FOO`, SerialNumber: `123`, JWKThumbprint: `bim`, Reason: `bap`, }, - denylistEntry{ + { Issuer: `BAR`, SerialNumber: `456`, JWKThumbprint: `bam`, Reason: `bar`, }, - denylistEntry{ + { Issuer: ``, SerialNumber: bannedCertSerialNumber, JWKThumbprint: `PVOjk-5d4Lb-FGxurW-fNMUv3rYZZBWF3gGaP5s1UVQ`, Reason: `baz1`, }, - denylistEntry{ + { Issuer: bannedCertIssuer, SerialNumber: ``, JWKThumbprint: ``, Reason: `baz2`, }, - denylistEntry{ + { Issuer: bannedCertIssuer, SerialNumber: bannedCertSerialNumber, JWKThumbprint: `PVOjk-5d4Lb-FGxurW-fNMUv3rYZZBWF3gGaP5s1UVQ`, Reason: `baz3`, }, - denylistEntry{ + { Issuer: bannedCertIssuer + `arst`, SerialNumber: bannedCertSerialNumber, JWKThumbprint: `PVOjk-5d4Lb-FGxurW-fNMUv3rYZZBWF3gGaP5s1UVQ`, diff --git a/vcr/issuer/network_publisher_test.go b/vcr/issuer/network_publisher_test.go index 117fd8023d..cfad696ba0 100644 --- a/vcr/issuer/network_publisher_test.go +++ b/vcr/issuer/network_publisher_test.go @@ -29,7 +29,7 @@ import ( "github.com/nuts-foundation/nuts-node/crypto" "github.com/nuts-foundation/nuts-node/network" "github.com/nuts-foundation/nuts-node/vcr/credential" - types "github.com/nuts-foundation/nuts-node/vcr/types" + "github.com/nuts-foundation/nuts-node/vcr/types" "github.com/nuts-foundation/nuts-node/vdr" "github.com/nuts-foundation/nuts-node/vdr/resolver" "github.com/stretchr/testify/assert"