Skip to content

Commit

Permalink
Use gofrs/uuid instead of satori/go.uuid (#1973)
Browse files Browse the repository at this point in the history
satori's package isn't being maintained anymore.
  • Loading branch information
raphael authored Jan 28, 2019
1 parent 4a2fb39 commit f1ca333
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion design/random.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"math/rand"
"time"

uuid "github.com/gofrs/uuid"
"github.com/manveru/faker"
uuid "github.com/satori/go.uuid"
)

// RandomGenerator generates consistent random values of different types given a seed.
Expand Down
2 changes: 1 addition & 1 deletion design/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"time"

"github.com/goadesign/goa/dslengine"
uuid "github.com/satori/go.uuid"
uuid "github.com/gofrs/uuid"
)

// DefaultView is the name of the default view.
Expand Down
8 changes: 4 additions & 4 deletions goagen/gen_app/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (g *Generator) generateContexts() (err error) {
codegen.SimpleImport("time"),
codegen.SimpleImport("unicode/utf8"),
codegen.SimpleImport("github.com/goadesign/goa"),
codegen.NewImport("uuid", "github.com/satori/go.uuid"),
codegen.NewImport("uuid", "github.com/gofrs/uuid"),
codegen.SimpleImport("context"),
}
g.API.IterateResources(func(r *design.ResourceDefinition) error {
Expand Down Expand Up @@ -244,7 +244,7 @@ func (g *Generator) generateControllers() (err error) {
codegen.SimpleImport("regexp"),
codegen.SimpleImport("strconv"),
codegen.SimpleImport("time"),
codegen.NewImport("uuid", "github.com/satori/go.uuid"),
codegen.NewImport("uuid", "github.com/gofrs/uuid"),
}
encoders, err := BuildEncoders(g.API.Produces, true)
if err != nil {
Expand Down Expand Up @@ -448,7 +448,7 @@ func (g *Generator) generateMediaTypes() (err error) {
codegen.SimpleImport("fmt"),
codegen.SimpleImport("time"),
codegen.SimpleImport("unicode/utf8"),
codegen.NewImport("uuid", "github.com/satori/go.uuid"),
codegen.NewImport("uuid", "github.com/gofrs/uuid"),
}
for _, v := range g.API.MediaTypes {
imports = codegen.AttributeImports(v.AttributeDefinition, imports, nil)
Expand Down Expand Up @@ -496,7 +496,7 @@ func (g *Generator) generateUserTypes() (err error) {
codegen.SimpleImport("time"),
codegen.SimpleImport("unicode/utf8"),
codegen.SimpleImport("github.com/goadesign/goa"),
codegen.NewImport("uuid", "github.com/satori/go.uuid"),
codegen.NewImport("uuid", "github.com/gofrs/uuid"),
}
for _, v := range g.API.Types {
imports = codegen.AttributeImports(v.AttributeDefinition, imports, nil)
Expand Down
2 changes: 1 addition & 1 deletion goagen/gen_app/test_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (g *Generator) generateResourceTest() error {
codegen.SimpleImport("github.com/goadesign/goa"),
codegen.SimpleImport("github.com/goadesign/goa/goatest"),
codegen.SimpleImport("context"),
codegen.NewImport("uuid", "github.com/satori/go.uuid"),
codegen.NewImport("uuid", "github.com/gofrs/uuid"),
}

return g.API.IterateResources(func(res *design.ResourceDefinition) (err error) {
Expand Down
2 changes: 1 addition & 1 deletion uuid/uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"database/sql/driver"
"fmt"

uuid "github.com/satori/go.uuid"
uuid "github.com/gofrs/uuid"
)

// FromString Wrapper around the real FromString
Expand Down
2 changes: 1 addition & 1 deletion uuid/uuid_js.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// +build js

//This part is copied from github.com/satori/go.uuid but some feature uses non gopherjs compliants calls
//This part is copied from github.com/gofrs/uuid but some feature uses non gopherjs compliants calls
//Since goa only needs a subset of the features the js copies them in here

package uuid
Expand Down

0 comments on commit f1ca333

Please sign in to comment.