Skip to content

Commit

Permalink
Add go modules for v5 (#494)
Browse files Browse the repository at this point in the history
* Add go modules for v5

* Fix fmt
  • Loading branch information
stanislas-m authored Dec 3, 2019
1 parent 9c2efc2 commit 75bc832
Show file tree
Hide file tree
Showing 74 changed files with 466 additions and 133 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ tsoda
testdata/migrations/schema.sql
.grifter/
vendor/
go.mod
go.sum

# test data
cockroach-data/
2 changes: 1 addition & 1 deletion associations/association.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"

"github.com/gobuffalo/nulls"
"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/v5/columns"
)

// Association represents a definition of a model association
Expand Down
4 changes: 2 additions & 2 deletions associations/associations_for_struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"regexp"
"strings"

"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/internal/oncer"
"github.com/gobuffalo/pop/v5/columns"
"github.com/gobuffalo/pop/v5/internal/oncer"
)

// If a field match with the regexp, it will be considered as a valid field definition.
Expand Down
4 changes: 2 additions & 2 deletions associations/belongs_to_association.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/gobuffalo/flect"
"github.com/gobuffalo/nulls"
"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/internal/defaults"
"github.com/gobuffalo/pop/v5/columns"
"github.com/gobuffalo/pop/v5/internal/defaults"
)

// belongsToAssociation is the implementation for the belongs_to association type in a model.
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 @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/gobuffalo/pop/associations"
"github.com/gobuffalo/pop/v5/associations"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion associations/has_many_association_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

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

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

"github.com/gobuffalo/flect"
"github.com/gobuffalo/nulls"
"github.com/gobuffalo/pop/internal/defaults"
"github.com/gobuffalo/pop/v5/internal/defaults"
)

// hasOneAssociation is a 1 to 1 kind of association. It's used on
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 @@ -5,7 +5,7 @@ import (
"testing"

"github.com/gobuffalo/nulls"
"github.com/gobuffalo/pop/associations"
"github.com/gobuffalo/pop/v5/associations"
"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/pop/internal/defaults"
"github.com/gobuffalo/pop/v5/internal/defaults"
"github.com/gofrs/uuid"
)

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

"github.com/gobuffalo/pop/associations"
"github.com/gobuffalo/pop/v5/associations"
"github.com/gofrs/uuid"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion columns/column_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package columns_test
import (
"testing"

"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/v5/columns"
"github.com/stretchr/testify/require"
)

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

"github.com/gobuffalo/pop/internal/oncer"
"github.com/gobuffalo/pop/v5/internal/oncer"
)

// ColumnsForStruct returns a Columns instance for
Expand Down
2 changes: 1 addition & 1 deletion columns/columns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/v5/columns"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion columns/readable_columns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package columns_test
import (
"testing"

"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/v5/columns"
"github.com/stretchr/testify/require"
)

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

"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/v5/columns"

"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion columns/writeable_columns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package columns_test
import (
"testing"

"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/v5/columns"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pop
import (
"fmt"

"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/pop/v5/logging"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"text/template"

"github.com/gobuffalo/envy"
"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/pop/v5/logging"
"github.com/pkg/errors"
"gopkg.in/yaml.v2"
)
Expand Down
4 changes: 2 additions & 2 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"sync/atomic"
"time"

"github.com/gobuffalo/pop/internal/defaults"
"github.com/gobuffalo/pop/internal/randx"
"github.com/gobuffalo/pop/v5/internal/defaults"
"github.com/gobuffalo/pop/v5/internal/randx"
"github.com/jmoiron/sqlx"
"github.com/pkg/errors"
)
Expand Down
6 changes: 3 additions & 3 deletions connection_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"strings"
"time"

"github.com/gobuffalo/pop/internal/defaults"
"github.com/gobuffalo/pop/internal/oncer"
"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/pop/v5/internal/defaults"
"github.com/gobuffalo/pop/v5/internal/oncer"
"github.com/gobuffalo/pop/v5/logging"
"github.com/pkg/errors"
)

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

"github.com/gobuffalo/fizz"
"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/v5/columns"
)

type crudable interface {
Expand Down
6 changes: 3 additions & 3 deletions dialect_cockroach.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
_ "github.com/cockroachdb/cockroach-go/crdb" // Load CockroachdbQL/postgres Go driver which also loads github.com/lib/pq
"github.com/gobuffalo/fizz"
"github.com/gobuffalo/fizz/translators"
"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/internal/defaults"
"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/pop/v5/columns"
"github.com/gobuffalo/pop/v5/internal/defaults"
"github.com/gobuffalo/pop/v5/logging"
"github.com/jmoiron/sqlx"
"github.com/pkg/errors"
)
Expand Down
4 changes: 2 additions & 2 deletions dialect_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"os/exec"
"strings"

"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/pop/v5/columns"
"github.com/gobuffalo/pop/v5/logging"
"github.com/gofrs/uuid"
"github.com/jmoiron/sqlx"
"github.com/pkg/errors"
Expand Down
8 changes: 4 additions & 4 deletions dialect_mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
_mysql "github.com/go-sql-driver/mysql"
"github.com/gobuffalo/fizz"
"github.com/gobuffalo/fizz/translators"
"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/internal/defaults"
"github.com/gobuffalo/pop/internal/oncer"
"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/pop/v5/columns"
"github.com/gobuffalo/pop/v5/internal/defaults"
"github.com/gobuffalo/pop/v5/internal/oncer"
"github.com/gobuffalo/pop/v5/logging"
"github.com/pkg/errors"
)

Expand Down
6 changes: 3 additions & 3 deletions dialect_postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (

"github.com/gobuffalo/fizz"
"github.com/gobuffalo/fizz/translators"
"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/internal/defaults"
"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/pop/v5/columns"
"github.com/gobuffalo/pop/v5/internal/defaults"
"github.com/gobuffalo/pop/v5/logging"
"github.com/jmoiron/sqlx"
pg "github.com/lib/pq"
"github.com/pkg/errors"
Expand Down
6 changes: 3 additions & 3 deletions dialect_sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
_ "github.com/mattn/go-sqlite3" // Load SQLite3 CGo driver
"github.com/pkg/errors"

"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/internal/defaults"
"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/pop/v5/columns"
"github.com/gobuffalo/pop/v5/internal/defaults"
"github.com/gobuffalo/pop/v5/logging"
)

const nameSQLite3 = "sqlite3"
Expand Down
6 changes: 3 additions & 3 deletions executors.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package pop
import (
"reflect"

"github.com/gobuffalo/pop/associations"
"github.com/gobuffalo/pop/columns"
"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/pop/v5/associations"
"github.com/gobuffalo/pop/v5/columns"
"github.com/gobuffalo/pop/v5/logging"
"github.com/gobuffalo/validate"
"github.com/gofrs/uuid"
"github.com/pkg/errors"
Expand Down
4 changes: 2 additions & 2 deletions finders.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strconv"
"strings"

"github.com/gobuffalo/pop/associations"
"github.com/gobuffalo/pop/logging"
"github.com/gobuffalo/pop/v5/associations"
"github.com/gobuffalo/pop/v5/logging"
"github.com/gofrs/uuid"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion 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 genny/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/gobuffalo/genny"
"github.com/gobuffalo/pop"
"github.com/gobuffalo/pop/v5"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion genny/model/_fixtures/models/widget.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"github.com/gobuffalo/nulls"
"github.com/gobuffalo/pop"
"github.com/gobuffalo/pop/v5"
"github.com/gobuffalo/validate"
"github.com/gobuffalo/validate/validators"
"github.com/gofrs/uuid"
Expand Down
2 changes: 1 addition & 1 deletion genny/model/_fixtures/models/widget_empty.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package models
import (
"encoding/json"

"github.com/gobuffalo/pop"
"github.com/gobuffalo/pop/v5"
"github.com/gobuffalo/validate"
)

Expand Down
2 changes: 1 addition & 1 deletion genny/model/_fixtures/models/widget_jsonapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"github.com/gobuffalo/nulls"
"github.com/gobuffalo/pop"
"github.com/gobuffalo/pop/v5"
"github.com/gobuffalo/validate"
"github.com/gobuffalo/validate/validators"
"github.com/gofrs/uuid"
Expand Down
2 changes: 1 addition & 1 deletion genny/model/_fixtures/models/widget_xml.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"github.com/gobuffalo/nulls"
"github.com/gobuffalo/pop"
"github.com/gobuffalo/pop/v5"
"github.com/gobuffalo/validate"
"github.com/gobuffalo/validate/validators"
"github.com/gofrs/uuid"
Expand Down
4 changes: 2 additions & 2 deletions genny/model/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
func buildImports(opts *Options) []string {
imps := map[string]bool{
"github.com/gobuffalo/validate": true,
"github.com/gobuffalo/pop": true,
"github.com/gobuffalo/pop/v5": true,
}
if opts.Encoding == "jsonapi" {
imps["github.com/google/jsonapi"] = true
Expand All @@ -29,7 +29,7 @@ func buildImports(opts *Options) []string {
imps["github.com/gobuffalo/nulls"] = true
}
if strings.HasPrefix(a.GoType(), "slices") {
imps["github.com/gobuffalo/pop/slices"] = true
imps["github.com/gobuffalo/pop/v5/slices"] = true
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion genny/model/model-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 genny/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func New(opts *Options) (*genny.Generator, error) {
return g, err
}

if err := g.Box(packr.New("github.com/gobuffalo/pop/genny/model/templates", "../model/templates")); err != nil {
if err := g.Box(packr.New("github.com/gobuffalo/pop/v5/genny/model/templates", "../model/templates")); err != nil {
return g, err
}

Expand Down
Loading

0 comments on commit 75bc832

Please sign in to comment.