go: rename module from github.com/facebook/ent => entgo.io/ent (#1226)

This commit is contained in:
Ariel Mashraki
2021-02-02 23:03:04 +02:00
committed by GitHub
parent 7a2173f20d
commit dd4792f5b3
1087 changed files with 3956 additions and 3956 deletions

View File

@@ -4,7 +4,7 @@
package edge
import "github.com/facebook/ent/schema"
import "entgo.io/ent/schema"
// Annotation is a builtin schema annotation for
// configuring the edges behavior in codegen.

View File

@@ -7,7 +7,7 @@ package edge
import (
"reflect"
"github.com/facebook/ent/schema"
"entgo.io/ent/schema"
)
// A Descriptor for edge configuration.

View File

@@ -7,9 +7,9 @@ package edge_test
import (
"testing"
"github.com/facebook/ent"
"github.com/facebook/ent/schema"
"github.com/facebook/ent/schema/edge"
"entgo.io/ent"
"entgo.io/ent/schema"
"entgo.io/ent/schema/edge"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

View File

@@ -4,7 +4,7 @@
package field
import "github.com/facebook/ent/schema"
import "entgo.io/ent/schema"
// Annotation is a builtin schema annotation for
// configuring the schema fields in codegen.

View File

@@ -7,7 +7,7 @@ package field_test
import (
"testing"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/schema/field"
"github.com/stretchr/testify/assert"
)

View File

@@ -14,7 +14,7 @@ import (
"regexp"
"time"
"github.com/facebook/ent/schema"
"entgo.io/ent/schema"
)
// String returns a new Field with type string.

View File

@@ -15,8 +15,8 @@ import (
"testing"
"time"
"github.com/facebook/ent/dialect"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/dialect"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
@@ -70,7 +70,7 @@ func TestInt(t *testing.T) {
fd = field.Int("active").GoType(Count(0)).Descriptor()
assert.NoError(t, fd.Err)
assert.Equal(t, "field_test.Count", fd.Info.Ident)
assert.Equal(t, "github.com/facebook/ent/schema/field_test", fd.Info.PkgPath)
assert.Equal(t, "entgo.io/ent/schema/field_test", fd.Info.PkgPath)
assert.Equal(t, "field_test.Count", fd.Info.String())
assert.False(t, fd.Info.Nillable)
assert.False(t, fd.Info.ValueScanner())
@@ -125,7 +125,7 @@ func TestFloat(t *testing.T) {
fd = field.Float("active").GoType(Count(0)).Descriptor()
assert.NoError(t, fd.Err)
assert.Equal(t, "field_test.Count", fd.Info.Ident)
assert.Equal(t, "github.com/facebook/ent/schema/field_test", fd.Info.PkgPath)
assert.Equal(t, "entgo.io/ent/schema/field_test", fd.Info.PkgPath)
assert.Equal(t, "field_test.Count", fd.Info.String())
assert.False(t, fd.Info.Nillable)
assert.False(t, fd.Info.ValueScanner())
@@ -159,7 +159,7 @@ func TestBool(t *testing.T) {
fd = field.Bool("active").GoType(Status(false)).Descriptor()
assert.NoError(t, fd.Err)
assert.Equal(t, "field_test.Status", fd.Info.Ident)
assert.Equal(t, "github.com/facebook/ent/schema/field_test", fd.Info.PkgPath)
assert.Equal(t, "entgo.io/ent/schema/field_test", fd.Info.PkgPath)
assert.Equal(t, "field_test.Status", fd.Info.String())
assert.False(t, fd.Info.Nillable)
assert.False(t, fd.Info.ValueScanner())
@@ -326,7 +326,7 @@ func TestString(t *testing.T) {
}
fd = field.String("nullable_url").GoType(&tURL{}).Descriptor()
assert.Equal(t, "field_test.tURL", fd.Info.Ident)
assert.Equal(t, "github.com/facebook/ent/schema/field_test", fd.Info.PkgPath)
assert.Equal(t, "entgo.io/ent/schema/field_test", fd.Info.PkgPath)
assert.Equal(t, "field_test.tURL", fd.Info.String())
assert.True(t, fd.Info.ValueScanner())
assert.True(t, fd.Info.Stringer())
@@ -366,7 +366,7 @@ func TestTime(t *testing.T) {
fd = field.Time("deleted_at").GoType(Time{}).Descriptor()
assert.NoError(t, fd.Err)
assert.Equal(t, "field_test.Time", fd.Info.Ident)
assert.Equal(t, "github.com/facebook/ent/schema/field_test", fd.Info.PkgPath)
assert.Equal(t, "entgo.io/ent/schema/field_test", fd.Info.PkgPath)
assert.Equal(t, "field_test.Time", fd.Info.String())
assert.False(t, fd.Info.Nillable)
assert.False(t, fd.Info.ValueScanner())
@@ -471,7 +471,7 @@ func TestField_Enums(t *testing.T) {
fd = field.Enum("role").GoType(Role("")).Descriptor()
assert.NoError(t, fd.Err)
assert.Equal(t, "field_test.Role", fd.Info.Ident)
assert.Equal(t, "github.com/facebook/ent/schema/field_test", fd.Info.PkgPath)
assert.Equal(t, "entgo.io/ent/schema/field_test", fd.Info.PkgPath)
assert.Equal(t, "field_test.Role", fd.Info.String())
assert.False(t, fd.Info.Nillable)
assert.False(t, fd.Info.ValueScanner())
@@ -520,7 +520,7 @@ func TestField_Other(t *testing.T) {
assert.Equal(t, "other", fd.Name)
assert.True(t, fd.Unique)
assert.Equal(t, "field_test.custom", fd.Info.String())
assert.Equal(t, "github.com/facebook/ent/schema/field_test", fd.Info.PkgPath)
assert.Equal(t, "entgo.io/ent/schema/field_test", fd.Info.PkgPath)
assert.NotNil(t, fd.Default)
fd = field.Other("other", &custom{}).

View File

@@ -13,7 +13,7 @@ import (
"strings"
"text/template"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/schema/field"
)
func main() {

View File

@@ -9,7 +9,7 @@ import (
"errors"
"reflect"
"github.com/facebook/ent/schema"
"entgo.io/ent/schema"
)
//go:generate go run internal/gen.go

View File

@@ -8,7 +8,7 @@ import (
"errors"
"reflect"
"github.com/facebook/ent/schema"
"entgo.io/ent/schema"
)
//go:generate go run internal/gen.go

View File

@@ -7,7 +7,7 @@ package index_test
import (
"testing"
"github.com/facebook/ent/schema/index"
"entgo.io/ent/schema/index"
"github.com/stretchr/testify/require"
)

View File

@@ -7,9 +7,9 @@ package mixin
import (
"time"
"github.com/facebook/ent"
"github.com/facebook/ent/schema"
"github.com/facebook/ent/schema/field"
"entgo.io/ent"
"entgo.io/ent/schema"
"entgo.io/ent/schema/field"
)
// Schema is the default implementation for the ent.Mixin interface.

View File

@@ -7,10 +7,10 @@ package mixin_test
import (
"testing"
"github.com/facebook/ent"
"github.com/facebook/ent/schema"
"github.com/facebook/ent/schema/edge"
"github.com/facebook/ent/schema/mixin"
"entgo.io/ent"
"entgo.io/ent/schema"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/mixin"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"