Skip to content

Commit

Permalink
Migrate gobuffalo/uuid to gofrs/uuid (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislas-m authored Feb 13, 2019
1 parent a44e8e5 commit 891bf42
Show file tree
Hide file tree
Showing 23 changed files with 36 additions and 38 deletions.
8 changes: 2 additions & 6 deletions SHOULDERS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# github.com/gobuffalo/pop Stands on the Shoulders of Giants
# Pop Stands on the Shoulders of Giants

github.com/gobuffalo/pop does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work.
Pop does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants, this project would not be possible. Please make sure to check them out and thank them for all of their hard work.

Thank you to the following **GIANTS**:

Expand Down Expand Up @@ -113,10 +113,6 @@ Thank you to the following **GIANTS**:

* [github.com/markbates/oncer](https://godoc.org/github.com/markbates/oncer)

* [github.com/mattn/go-colorable](https://godoc.org/github.com/mattn/go-colorable)

* [github.com/mattn/go-isatty](https://godoc.org/github.com/mattn/go-isatty)

* [github.com/microcosm-cc/bluemonday](https://godoc.org/github.com/microcosm-cc/bluemonday)

* [github.com/pkg/errors](https://godoc.org/github.com/pkg/errors)
Expand Down
2 changes: 1 addition & 1 deletion associations/belongs_to_association_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

"github.com/gobuffalo/pop/associations"
"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion associations/has_one_association_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/gobuffalo/pop/associations"
"github.com/gobuffalo/pop/nulls"
"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion associations/many_to_many_association.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/gobuffalo/flect"
"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
)

type manyToManyAssociation struct {
Expand Down
8 changes: 4 additions & 4 deletions associations/many_to_many_association_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"testing"

"github.com/gobuffalo/pop/associations"
"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/require"
)

type fooManyToMany struct {
ID uuid.UUID `db:"id"`
BarManyToManies barManyToManies `many_to_many:"foos_and_bars"`
ID uuid.UUID `db:"id"`
BarManyToManies barManyToManies `many_to_many:"foos_and_bars"`
}

type fooManyToMany2 struct {
Expand Down Expand Up @@ -63,4 +63,4 @@ func Test_Many_To_Many_PrimaryId_Tag(t *testing.T) {
where, args := as[0].Constraint()
a.Equal("id in (select bar_many_to_many_id from foos_and_bars where fufu_id = ?)", where)
a.Equal(id, args[0].(uuid.UUID))
}
}
2 changes: 1 addition & 1 deletion dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/gobuffalo/fizz"
"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/jmoiron/sqlx"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion executors.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/gobuffalo/pop/associations"
"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/uuid"
"github.com/gobuffalo/validate"
"github.com/gofrs/uuid"
)

// Reload fetch fresh data for a given model, using its ID.
Expand Down
2 changes: 1 addition & 1 deletion executors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/gobuffalo/pop/nulls"
"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion finders.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/gobuffalo/pop/associations"
"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion finders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/gobuffalo/pop/nulls"
"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/require"
)

Expand Down
1 change: 1 addition & 0 deletions genny/config/config-packr.go

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

2 changes: 1 addition & 1 deletion model.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/gobuffalo/flect"
nflect "github.com/gobuffalo/flect/name"
"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion nulls/nulls.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package nulls
import (
"database/sql/driver"

"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
)

// nullable a generic representation of nulls type.
Expand Down
2 changes: 1 addition & 1 deletion nulls/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

. "github.com/gobuffalo/pop/nulls"
"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/jmoiron/sqlx"
_ "github.com/mattn/go-sqlite3"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion nulls/uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/json"
"strings"

"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion nulls/uuid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"testing"

"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/require"
)

Expand Down
19 changes: 10 additions & 9 deletions packrd/packed-packr.go

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

2 changes: 1 addition & 1 deletion pop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (

"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/pop/nulls"
"github.com/gobuffalo/uuid"
"github.com/gobuffalo/validate"
"github.com/gobuffalo/validate/validators"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/suite"
)

Expand Down
2 changes: 1 addition & 1 deletion query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion slices/uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"strings"

"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion slices/uuid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"testing"

"github.com/gobuffalo/uuid"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion soda/cmd/generate/attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func newAttribute(base string, model *model) (attribute, error) {
model.Imports = append(model.Imports, "github.com/gobuffalo/pop/slices")
} else if !model.HasUUID && col[1] == "uuid" {
model.HasUUID = true
model.Imports = append(model.Imports, "github.com/gobuffalo/uuid")
model.Imports = append(model.Imports, "github.com/gofrs/uuid")
}

got := colType(col[1])
Expand Down
2 changes: 1 addition & 1 deletion soda/cmd/generate/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (m *model) addID() {

if !m.HasUUID {
m.HasUUID = true
m.Imports = append(m.Imports, "github.com/gobuffalo/uuid")
m.Imports = append(m.Imports, "github.com/gofrs/uuid")
}

id := flect.New("id")
Expand Down

0 comments on commit 891bf42

Please sign in to comment.