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

@@ -9,9 +9,9 @@ import (
"path/filepath"
"testing"
"github.com/facebook/ent/entc"
"github.com/facebook/ent/entc/gen"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/entc"
"entgo.io/ent/entc/gen"
"entgo.io/ent/schema/field"
"github.com/stretchr/testify/require"
)
@@ -25,7 +25,7 @@ func BenchmarkGraph_Gen(b *testing.B) {
Storage: storage,
IDType: &field.TypeInfo{Type: field.TypeInt},
Target: target,
Package: "github.com/facebook/ent/entc/integration/ent",
Package: "entgo.io/ent/entc/integration/ent",
Templates: []*gen.Template{
gen.MustParse(gen.NewTemplate("template").
Funcs(gen.Funcs).

View File

@@ -17,7 +17,7 @@ import (
"text/template"
"unicode"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/schema/field"
"github.com/go-openapi/inflect"
)

View File

@@ -17,9 +17,9 @@ import (
"runtime/debug"
"text/template/parse"
"github.com/facebook/ent/dialect/sql/schema"
"github.com/facebook/ent/entc/load"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/dialect/sql/schema"
"entgo.io/ent/entc/load"
"entgo.io/ent/schema/field"
"golang.org/x/tools/imports"
)

View File

@@ -11,8 +11,8 @@ import (
"reflect"
"testing"
"github.com/facebook/ent/entc/load"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/entc/load"
"entgo.io/ent/schema/field"
"github.com/stretchr/testify/require"
)

File diff suppressed because one or more lines are too long

View File

@@ -8,8 +8,8 @@ import (
"fmt"
"reflect"
"github.com/facebook/ent/dialect/gremlin/graph/dsl"
"github.com/facebook/ent/dialect/sql"
"entgo.io/ent/dialect/gremlin/graph/dsl"
"entgo.io/ent/dialect/sql"
)
// A SchemaMode defines what type of schema feature a storage driver support.
@@ -52,9 +52,9 @@ var drivers = []*Storage{
Builder: reflect.TypeOf(&sql.Selector{}),
Dialects: []string{"dialect.SQLite", "dialect.MySQL", "dialect.Postgres"},
Imports: []string{
"github.com/facebook/ent/dialect/sql",
"github.com/facebook/ent/dialect/sql/sqlgraph",
"github.com/facebook/ent/schema/field",
"entgo.io/ent/dialect/sql",
"entgo.io/ent/dialect/sql/sqlgraph",
"entgo.io/ent/schema/field",
},
SchemaMode: Unique | Indexes | Cascade | Migrate,
Ops: func(f *Field) []Op {
@@ -71,12 +71,12 @@ var drivers = []*Storage{
Builder: reflect.TypeOf(&dsl.Traversal{}),
Dialects: []string{"dialect.Gremlin"},
Imports: []string{
"github.com/facebook/ent/dialect/gremlin",
"github.com/facebook/ent/dialect/gremlin/graph/dsl",
"github.com/facebook/ent/dialect/gremlin/graph/dsl/__",
"github.com/facebook/ent/dialect/gremlin/graph/dsl/g",
"github.com/facebook/ent/dialect/gremlin/graph/dsl/p",
"github.com/facebook/ent/dialect/gremlin/encoding/graphson",
"entgo.io/ent/dialect/gremlin",
"entgo.io/ent/dialect/gremlin/graph/dsl",
"entgo.io/ent/dialect/gremlin/graph/dsl/__",
"entgo.io/ent/dialect/gremlin/graph/dsl/g",
"entgo.io/ent/dialect/gremlin/graph/dsl/p",
"entgo.io/ent/dialect/gremlin/encoding/graphson",
},
SchemaMode: Unique,
OpCode: opCodes(gremlinCode[:]),

View File

@@ -16,7 +16,7 @@ import (
"text/template"
"text/template/parse"
"github.com/facebook/ent/entc/gen/internal"
"entgo.io/ent/entc/gen/internal"
)
//go:generate go run github.com/go-bindata/go-bindata/go-bindata -o=internal/bindata.go -pkg=internal -mode=420 -modtime=1 ./template/...

View File

@@ -18,7 +18,7 @@ import (
"{{ $.Config.Package }}/{{ $n.Package }}"
{{- end }}
"github.com/facebook/ent"
"entgo.io/ent"
)
const (

View File

@@ -296,4 +296,4 @@ func ({{ $receiver }} *{{ $onebuilder }}) ExecX(ctx context.Context) {
}
{{ end }}
{{ end }}
{{ end }}

View File

@@ -17,7 +17,7 @@ import (
"{{ $n.Config.Package }}/{{ $n.Package }}"
{{- end }}
"github.com/facebook/ent/dialect"
"entgo.io/ent/dialect"
{{ range $_, $import := $.Storage.Imports -}}
"{{ $import }}"
{{ end -}}

View File

@@ -15,10 +15,10 @@ import (
"{{ $.Config.Package }}/{{ $n.Package }}"
{{- end }}
"github.com/facebook/ent/dialect/sql"
"github.com/facebook/ent/dialect/sql/sqlgraph"
"github.com/facebook/ent/entql"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"entgo.io/ent/entql"
"entgo.io/ent/schema/field"
)
// schemaGraph holds a representation of ent/schema at runtime.

View File

@@ -178,4 +178,4 @@ func NewSchemaConfigContext(parent context.Context, config SchemaConfig) context
{{- end }}
{{- end }}
step.Edge.Schema = schemaConfig.{{ $schema }}
{{- end -}}
{{- end -}}

View File

@@ -80,4 +80,4 @@ func ValidColumn(column string) bool {
{{- end }}
return false
}
{{ end }}
{{ end }}

View File

@@ -379,4 +379,4 @@ func ({{ $receiver }} *{{ $builder }}) sqlQuery(ctx context.Context) *sql.Select
return &ValidationError{Name: f, err: fmt.Errorf("{{ $pkg }}: invalid field %q for query", f)}
}
}
{{- end }}
{{- end }}

View File

@@ -20,7 +20,7 @@ import (
_ "{{ $.Config.Package }}/runtime"
{{ if $.SupportMigrate }}
"github.com/facebook/ent/dialect/sql/schema"
"entgo.io/ent/dialect/sql/schema"
{{ end }}
)

View File

@@ -21,8 +21,8 @@ import (
{{- /* Import external packages */}}
{{- template "import/types" $ }}
{{- end }}
"github.com/facebook/ent"
"github.com/facebook/ent/dialect"
"entgo.io/ent"
"entgo.io/ent/dialect"
{{- with $.Storage }}
{{- range $import := .Imports }}
"{{ $import }}"
@@ -55,4 +55,4 @@ import (
{{- xtemplate $tmpl $ }}
{{- end }}
{{- end }}
{{ end }}
{{ end }}

View File

@@ -14,4 +14,4 @@ in the LICENSE file in the root directory of this source tree.
package internal
const Schema = `{{ .SchemaSnapshot }}`
{{ end }}
{{ end }}

View File

@@ -14,8 +14,8 @@ import (
"context"
"fmt"
"github.com/facebook/ent/dialect"
"github.com/facebook/ent/dialect/sql/schema"
"entgo.io/ent/dialect"
"entgo.io/ent/dialect/sql/schema"
)
var (

View File

@@ -15,9 +15,9 @@ import (
"{{ $.Config.Package }}/{{ $n.Package }}"
{{- end }}
"github.com/facebook/ent/dialect/entsql"
"github.com/facebook/ent/dialect/sql/schema"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/dialect/entsql"
"entgo.io/ent/dialect/sql/schema"
"entgo.io/ent/schema/field"
)
var (

View File

@@ -13,8 +13,8 @@ in the LICENSE file in the root directory of this source tree.
import (
"fmt"
"github.com/facebook/ent/dialect/gremlin/graph/dsl"
"github.com/facebook/ent/dialect/sql"
"entgo.io/ent/dialect/gremlin/graph/dsl"
"entgo.io/ent/dialect/sql"
)
{{ range $_, $n := $.Nodes -}}

View File

@@ -13,7 +13,7 @@ in the LICENSE file in the root directory of this source tree.
import (
"{{ $.Config.Package }}"
"github.com/facebook/ent/privacy"
"entgo.io/ent/privacy"
)
{{ $pkg := base $.Config.Package }}

View File

@@ -75,8 +75,8 @@ import (
{{- template "import/types" $n }}
{{- end }}
"github.com/facebook/ent"
"github.com/facebook/ent/privacy"
"entgo.io/ent"
"entgo.io/ent/privacy"
)

View File

@@ -12,7 +12,7 @@ import (
"context"
"sync"
"github.com/facebook/ent/dialect"
"entgo.io/ent/dialect"
)
// Tx is a transactional client that is created by calling Client.Tx().

View File

@@ -150,4 +150,4 @@ func Not(p predicate.{{ $.Name }}) predicate.{{ $.Name }} {
{{ end }}
{{/* A template that can be overridden in order to add additional code for the type package. */}}
{{ define "where/additional" }}{{ end }}
{{ define "where/additional" }}{{ end }}

View File

@@ -17,11 +17,11 @@ import (
"strings"
"unicode"
"github.com/facebook/ent"
"github.com/facebook/ent/dialect/entsql"
"github.com/facebook/ent/dialect/sql/schema"
"github.com/facebook/ent/entc/load"
"github.com/facebook/ent/schema/field"
"entgo.io/ent"
"entgo.io/ent/dialect/entsql"
"entgo.io/ent/dialect/sql/schema"
"entgo.io/ent/entc/load"
"entgo.io/ent/schema/field"
)
// The following types and their exported methods used by the codegen

View File

@@ -7,8 +7,8 @@ package gen
import (
"testing"
"github.com/facebook/ent/entc/load"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/entc/load"
"entgo.io/ent/schema/field"
"github.com/stretchr/testify/require"
)