Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Switch from satori/go.uuid to pborman/uuid #946

Merged
merged 3 commits into from
Nov 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/ore/do/create-image.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"time"

"github.com/satori/go.uuid"
"github.com/pborman/uuid"
"github.com/spf13/cobra"

ctplatform "github.com/coreos/container-linux-config-transpiler/config/platform"
Expand Down Expand Up @@ -81,7 +81,7 @@ func createImage() error {
if err != nil {
return err
}
keyID, err := API.AddKey(ctx, "ore-"+uuid.NewV4().String(), key)
keyID, err := API.AddKey(ctx, "ore-"+uuid.New(), key)
if err != nil {
return err
}
Expand Down
14 changes: 8 additions & 6 deletions glide.lock

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

4 changes: 2 additions & 2 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import:
version: 21cb3784d9bda523911b96719efba02b7e983256
- package: github.com/packethost/packngo
version: 80f62d78849dba04e42d8812329ee00558e37c5b
- package: github.com/satori/go.uuid
version: 08f0718b61e95ddba0ade3346725fe0e4bf28ca6
- package: github.com/pborman/uuid
version: v1.2.0
- package: github.com/spf13/cobra
version: 1c44ec8d3f1552cac48999f9306da23c4d8a288b
- package: github.com/spf13/pflag
Expand Down
13 changes: 5 additions & 8 deletions kola/tests/coretest/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"time"

"github.com/satori/go.uuid"
"github.com/pborman/uuid"

"github.com/coreos/mantle/kola/register"
)
Expand Down Expand Up @@ -308,16 +308,13 @@ func TestFsRandomUUID() error {
return fmt.Errorf("findmnt: %v", err)
}

got := bytes.TrimSpace(out)

var id uuid.UUID

if err := id.UnmarshalText(got); err != nil {
got, err := uuid.ParseBytes(bytes.TrimSpace(out))
if err != nil {
return fmt.Errorf("malformed GUID: %v", err)
}

defaultGUID := []byte("00000000-0000-0000-0000-000000000001")
if bytes.Equal(defaultGUID, got) {
defaultGUID := uuid.Parse("00000000-0000-0000-0000-000000000001")
if uuid.Equal(defaultGUID, got) {
return fmt.Errorf("unexpected default GUID found")
}

Expand Down
4 changes: 2 additions & 2 deletions platform/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"sync"
"time"

"github.com/satori/go.uuid"
"github.com/pborman/uuid"
"golang.org/x/crypto/ssh"
"golang.org/x/crypto/ssh/agent"

Expand All @@ -45,7 +45,7 @@ func NewBaseCluster(bf *BaseFlight, rconf *RuntimeConfig) (*BaseCluster, error)
bf: bf,
machmap: make(map[string]Machine),
consolemap: make(map[string]string),
name: fmt.Sprintf("%s-%s", bf.baseopts.BaseName, uuid.NewV4()),
name: fmt.Sprintf("%s-%s", bf.baseopts.BaseName, uuid.New()),
rconf: rconf,
}

Expand Down
4 changes: 2 additions & 2 deletions platform/flight.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"fmt"
"sync"

"github.com/satori/go.uuid"
"github.com/pborman/uuid"
"golang.org/x/crypto/ssh/agent"

"github.com/coreos/mantle/network"
Expand Down Expand Up @@ -49,7 +49,7 @@ func NewBaseFlightWithDialer(opts *Options, platform Name, ctPlatform string, di

bf := &BaseFlight{
clustermap: make(map[string]Cluster),
name: fmt.Sprintf("%s-%s", opts.BaseName, uuid.NewV4()),
name: fmt.Sprintf("%s-%s", opts.BaseName, uuid.New()),
platform: platform,
ctPlatform: ctPlatform,
baseopts: opts,
Expand Down
8 changes: 4 additions & 4 deletions platform/machine/qemu/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"
"sync"

"github.com/satori/go.uuid"
"github.com/pborman/uuid"

"github.com/coreos/mantle/platform"
"github.com/coreos/mantle/platform/conf"
Expand Down Expand Up @@ -50,9 +50,9 @@ func (qc *Cluster) NewMachine(userdata *conf.UserData) (platform.Machine, error)
}

func (qc *Cluster) NewMachineWithOptions(userdata *conf.UserData, options MachineOptions) (platform.Machine, error) {
id := uuid.NewV4()
id := uuid.New()

dir := filepath.Join(qc.RuntimeConf().OutputDir, id.String())
dir := filepath.Join(qc.RuntimeConf().OutputDir, id)
if err := os.Mkdir(dir, 0777); err != nil {
return nil, err
}
Expand Down Expand Up @@ -93,7 +93,7 @@ func (qc *Cluster) NewMachineWithOptions(userdata *conf.UserData, options Machin

qm := &machine{
qc: qc,
id: id.String(),
id: id,
netif: netif,
journal: journal,
consolePath: filepath.Join(dir, "console.txt"),
Expand Down
2 changes: 1 addition & 1 deletion sdk/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package sdk

import (
"github.com/satori/go.uuid"
"github.com/pborman/uuid"
)

// Partition UUIDs for CoreOS systems.
Expand Down
27 changes: 27 additions & 0 deletions vendor/github.com/google/uuid/LICENSE

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

80 changes: 80 additions & 0 deletions vendor/github.com/google/uuid/dce.go

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

12 changes: 12 additions & 0 deletions vendor/github.com/google/uuid/doc.go

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

53 changes: 53 additions & 0 deletions vendor/github.com/google/uuid/hash.go

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

Loading