Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
refactor: swap satori's uuid package to gofrs (#466)
Browse files Browse the repository at this point in the history
run gofmt

re-run dep ensure using dep 0.5.0
  • Loading branch information
mdanzinger authored and mboersma committed Feb 13, 2019
1 parent 242035c commit 0a6c592
Show file tree
Hide file tree
Showing 15 changed files with 899 additions and 15 deletions.
10 changes: 9 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ required = [
version = "0.8.0"

[[constraint]]
name = "github.com/satori/go.uuid"
version = "1.2.0"
name = "github.com/gofrs/uuid"
version = "3.2.0"

[[constraint]]
name = "github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion cmd/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (

"github.com/Azure/aks-engine/pkg/api"
"github.com/Azure/aks-engine/pkg/armhelpers"
"github.com/gofrs/uuid"
"github.com/pkg/errors"
uuid "github.com/satori/go.uuid"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"github.com/Azure/aks-engine/pkg/armhelpers"
"github.com/Azure/aks-engine/pkg/helpers"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/gofrs/uuid"
"github.com/pkg/errors"
uuid "github.com/satori/go.uuid"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
Expand Down
2 changes: 1 addition & 1 deletion cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package cmd
import (
"testing"

uuid "github.com/satori/go.uuid"
"github.com/gofrs/uuid"
"github.com/spf13/cobra"
ini "gopkg.in/ini.v1"
)
Expand Down
6 changes: 3 additions & 3 deletions pkg/api/mocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ package api

import (
"github.com/Azure/go-autorest/autorest/to"
uuid "github.com/satori/go.uuid"
"github.com/gofrs/uuid"
)

// CreateMockAgentPoolProfile creates a mock AgentPoolResource for testing
func CreateMockAgentPoolProfile(agentPoolName, orchestratorVersion string, provisioningState ProvisioningState, agentCount int) *AgentPoolResource {
agentPoolResource := AgentPoolResource{}
agentPoolResource.ID = uuid.NewV4().String()
agentPoolResource.ID = uuid.Must(uuid.NewV4()).String()
agentPoolResource.Location = "westus2"
agentPoolResource.Name = agentPoolName

Expand All @@ -27,7 +27,7 @@ func CreateMockAgentPoolProfile(agentPoolName, orchestratorVersion string, provi
// CreateMockContainerService returns a mock container service for testing purposes
func CreateMockContainerService(containerServiceName, orchestratorVersion string, masterCount, agentCount int, certs bool) *ContainerService {
cs := ContainerService{}
cs.ID = uuid.NewV4().String()
cs.ID = uuid.Must(uuid.NewV4()).String()
cs.Location = "eastus"
cs.Name = containerServiceName

Expand Down
2 changes: 1 addition & 1 deletion pkg/api/vlabs/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/Azure/aks-engine/pkg/api/common"
"github.com/Azure/aks-engine/pkg/helpers"
"github.com/blang/semver"
"github.com/gofrs/uuid"
"github.com/pkg/errors"
uuid "github.com/satori/go.uuid"
log "github.com/sirupsen/logrus"
validator "gopkg.in/go-playground/validator.v9"
)
Expand Down
8 changes: 4 additions & 4 deletions pkg/armhelpers/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
uuid "github.com/satori/go.uuid"
"github.com/gofrs/uuid"
log "github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -66,7 +66,7 @@ func (az *AzureClient) CreateApp(ctx context.Context, appName, appURL string, re
startDate := date.Time{Time: notBefore}
endDate := date.Time{Time: notAfter}

servicePrincipalClientSecret = uuid.NewV4().String()
servicePrincipalClientSecret = uuid.Must(uuid.NewV4()).String()

log.Debugf("ad: creating application with name=%q identifierURL=%q", appName, appURL)
applicationReq := graphrbac.ApplicationCreateParameters{
Expand All @@ -77,7 +77,7 @@ func (az *AzureClient) CreateApp(ctx context.Context, appName, appURL string, re
ReplyUrls: replyURLs,
PasswordCredentials: &[]graphrbac.PasswordCredential{
{
KeyID: to.StringPtr(uuid.NewV4().String()),
KeyID: to.StringPtr(uuid.Must(uuid.NewV4()).String()),
StartDate: &startDate,
EndDate: &endDate,
Value: to.StringPtr(servicePrincipalClientSecret),
Expand Down Expand Up @@ -115,7 +115,7 @@ func (az *AzureClient) DeleteApp(ctx context.Context, applicationName, applicati

// CreateRoleAssignmentSimple is a wrapper around RoleAssignmentsClient.Create
func (az *AzureClient) CreateRoleAssignmentSimple(ctx context.Context, resourceGroup, servicePrincipalObjectID string) error {
roleAssignmentName := uuid.NewV4().String()
roleAssignmentName := uuid.Must(uuid.NewV4()).String()

roleDefinitionID := fmt.Sprintf(AADRoleReferenceTemplate, az.subscriptionID, AADContributorRoleID)
scope := fmt.Sprintf(AADRoleResourceGroupScopeTemplate, az.subscriptionID, resourceGroup)
Expand Down
2 changes: 1 addition & 1 deletion pkg/operations/dcosupgrade/upgradecluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/Azure/aks-engine/pkg/api"
"github.com/Azure/aks-engine/pkg/armhelpers"
"github.com/Azure/aks-engine/pkg/i18n"
uuid "github.com/satori/go.uuid"
"github.com/gofrs/uuid"
"github.com/sirupsen/logrus"
)

Expand Down
20 changes: 20 additions & 0 deletions vendor/github.com/gofrs/uuid/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

212 changes: 212 additions & 0 deletions vendor/github.com/gofrs/uuid/codec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0a6c592

Please sign in to comment.