Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
adibrastegarnia committed Oct 1, 2020
1 parent 3420ec3 commit 96e4375
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion api/types/change/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewNetworkChange(networkChangeID string, changes []*devicechange.Change) (*
r1 := regexp.MustCompile(`[a-zA-Z0-9\-_]+`)
match := r1.FindString(networkChangeID)
if networkChangeID == "" {
uuid := utils.NewUuid()
uuid := utils.NewUUID()
networkChangeID = uuid.String()

} else if networkChangeID != match {
Expand Down
4 changes: 2 additions & 2 deletions pkg/store/change/network/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func WithChangeID(id networkchange.ID) WatchOption {

// newChangeID creates a new network change ID
func newChangeID() networkchange.ID {
newUuid := utils.NewUuid()
return networkchange.ID(newUuid.String())
newUUID := utils.NewUUID()
return networkchange.ID(newUUID.String())
}

// atomixStore is the default implementation of the NetworkConfig store
Expand Down
10 changes: 5 additions & 5 deletions pkg/utils/uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (
"github.com/google/uuid"
)

// NewUuid generates a new uuid
func NewUuid() uuid.UUID {
newUuid, err := uuid.NewUUID()
// NewUUID generates a new uuid
func NewUUID() uuid.UUID {
newUUID, err := uuid.NewUUID()
if err != nil {
newUuid = uuid.New()
newUUID = uuid.New()
}
return newUuid
return newUUID
}

0 comments on commit 96e4375

Please sign in to comment.