Skip to content

Commit

Permalink
go: rename module from github.com/facebook/ent => entgo.io/ent (#1226)
Browse files Browse the repository at this point in the history
  • Loading branch information
a8m committed Feb 2, 2021
1 parent 7a2173f commit dd4792f
Show file tree
Hide file tree
Showing 1,087 changed files with 3,966 additions and 3,966 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1.bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ Steps:
| Go | 1.15.? |
| Ent | 0.5.? |
| Database | Mysql |
| Driver | https://github.com/go-sql-driver/mysql |
| Driver | https://github.com/go-sql-driver/mysql |
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/2.feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ labels: 'status: needs triage'
<!--
What are you trying to accomplish? How has the lack of this feature affected you?
Providing context helps us come up with a solution that is most useful in the real world.
-->
-->
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/3.support.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
name: Question
about: General support
labels: 'status: needs triage'
---
---
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ with large data-models.

## Quick Installation
```console
go get github.com/facebook/ent/cmd/ent
go get entgo.io/ent/cmd/ent
```

For proper installation using [Go modules], visit [entgo.io website][entgo instal].
Expand Down
2 changes: 1 addition & 1 deletion cmd/ent/ent.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package main
import (
"log"

"github.com/facebook/ent/cmd/internal/base"
"entgo.io/ent/cmd/internal/base"

"github.com/spf13/cobra"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/ent/ent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

func TestCmd(t *testing.T) {
defer os.RemoveAll("ent")
cmd := exec.Command("go", "run", "github.com/facebook/ent/cmd/ent", "init", "User")
cmd := exec.Command("go", "run", "entgo.io/ent/cmd/ent", "init", "User")
stderr := bytes.NewBuffer(nil)
cmd.Stderr = stderr
require.NoError(t, cmd.Run(), stderr.String())
Expand All @@ -25,7 +25,7 @@ func TestCmd(t *testing.T) {
_, err = os.Stat("ent/schema/user.go")
require.NoError(t, err)

cmd = exec.Command("go", "run", "github.com/facebook/ent/cmd/ent", "generate", "./ent/schema")
cmd = exec.Command("go", "run", "entgo.io/ent/cmd/ent", "generate", "./ent/schema")
stderr = bytes.NewBuffer(nil)
cmd.Stderr = stderr
require.NoError(t, cmd.Run(), stderr.String())
Expand Down
8 changes: 4 additions & 4 deletions cmd/entc/entc.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"log"
"path/filepath"

"github.com/facebook/ent/cmd/internal/base"
"github.com/facebook/ent/entc/gen"
"entgo.io/ent/cmd/internal/base"
"entgo.io/ent/entc/gen"

"github.com/spf13/cobra"
)
Expand All @@ -30,11 +30,11 @@ func main() {
func migrate(c *gen.Config) {
var (
target = filepath.Join(c.Target, "generate.go")
oldCmd = []byte("github.com/facebook/ent/cmd/entc")
oldCmd = []byte("entgo.io/ent/cmd/entc")
)
buf, err := ioutil.ReadFile(target)
if err != nil || !bytes.Contains(buf, oldCmd) {
return
}
_ = ioutil.WriteFile(target, bytes.ReplaceAll(buf, oldCmd, []byte("github.com/facebook/ent/cmd/ent")), 0644)
_ = ioutil.WriteFile(target, bytes.ReplaceAll(buf, oldCmd, []byte("entgo.io/ent/cmd/ent")), 0644)
}
4 changes: 2 additions & 2 deletions cmd/entc/entc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

func TestCmd(t *testing.T) {
defer os.RemoveAll("ent")
cmd := exec.Command("go", "run", "github.com/facebook/ent/cmd/entc", "init", "User")
cmd := exec.Command("go", "run", "entgo.io/ent/cmd/entc", "init", "User")
stderr := bytes.NewBuffer(nil)
cmd.Stderr = stderr
require.NoError(t, cmd.Run(), stderr.String())
Expand All @@ -25,7 +25,7 @@ func TestCmd(t *testing.T) {
_, err = os.Stat("ent/schema/user.go")
require.NoError(t, err)

cmd = exec.Command("go", "run", "github.com/facebook/ent/cmd/entc", "generate", "./ent/schema")
cmd = exec.Command("go", "run", "entgo.io/ent/cmd/entc", "generate", "./ent/schema")
stderr = bytes.NewBuffer(nil)
cmd.Stderr = stderr
require.NoError(t, cmd.Run(), stderr.String())
Expand Down
12 changes: 6 additions & 6 deletions cmd/internal/base/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import (
"text/template"
"unicode"

"github.com/facebook/ent/cmd/internal/printer"
"github.com/facebook/ent/entc"
"github.com/facebook/ent/entc/gen"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/cmd/internal/printer"
"entgo.io/ent/entc"
"entgo.io/ent/entc/gen"
"entgo.io/ent/schema/field"

"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -218,7 +218,7 @@ func createDir(target string) error {
var tmpl = template.Must(template.New("schema").
Parse(`package schema
import "github.com/facebook/ent"
import "entgo.io/ent"
// {{ . }} holds the schema definition for the {{ . }} entity.
type {{ . }} struct {
Expand All @@ -240,7 +240,7 @@ const (
// default schema package path.
defaultSchema = "ent/schema"
// ent/generate.go file used for "go generate" command.
genFile = "package ent\n\n//go:generate go run github.com/facebook/ent/cmd/ent generate ./schema\n"
genFile = "package ent\n\n//go:generate go run entgo.io/ent/cmd/ent generate ./schema\n"
)

// examples formats the given examples to the cli.
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/printer/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strconv"
"strings"

"github.com/facebook/ent/entc/gen"
"entgo.io/ent/entc/gen"

"github.com/olekukonko/tablewriter"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/internal/printer/printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"testing"

"github.com/facebook/ent/entc/gen"
"github.com/facebook/ent/schema/field"
"entgo.io/ent/entc/gen"
"entgo.io/ent/schema/field"

"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion dialect/entsql/annotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package entsql

import "github.com/facebook/ent/schema"
import "entgo.io/ent/schema"

// Annotation is a builtin schema annotation for attaching
// SQL metadata to schema objects for both codegen and runtime.
Expand Down
4 changes: 2 additions & 2 deletions dialect/gremlin/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"context"
"fmt"

"github.com/facebook/ent/dialect"
"github.com/facebook/ent/dialect/gremlin/graph/dsl"
"entgo.io/ent/dialect"
"entgo.io/ent/dialect/gremlin/graph/dsl"
)

// Driver is a dialect.Driver implementation for TinkerPop gremlin.
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/graph/dsl/__/dsl.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package __

import "github.com/facebook/ent/dialect/gremlin/graph/dsl"
import "entgo.io/ent/dialect/gremlin/graph/dsl"

// As is the api for calling __.As().
func As(args ...interface{}) *dsl.Traversal { return New().As(args...) }
Expand Down
8 changes: 4 additions & 4 deletions dialect/gremlin/graph/dsl/dsl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"strconv"
"testing"

"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"
"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"

"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/graph/dsl/g/g.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package g

import "github.com/facebook/ent/dialect/gremlin/graph/dsl"
import "entgo.io/ent/dialect/gremlin/graph/dsl"

// V is the api for calling g.V().
func V(args ...interface{}) *dsl.Traversal { return dsl.NewTraversal().V(args...) }
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/graph/dsl/p/p.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package p

import (
"github.com/facebook/ent/dialect/gremlin/graph/dsl"
"entgo.io/ent/dialect/gremlin/graph/dsl"
)

// EQ is the equal predicate.
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/graph/edge.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package graph
import (
"fmt"

"github.com/facebook/ent/dialect/gremlin/encoding/graphson"
"entgo.io/ent/dialect/gremlin/encoding/graphson"

"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/graph/edge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"

"github.com/facebook/ent/dialect/gremlin/encoding/graphson"
"entgo.io/ent/dialect/gremlin/encoding/graphson"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/graph/vertex.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package graph
import (
"fmt"

"github.com/facebook/ent/dialect/gremlin/encoding/graphson"
"entgo.io/ent/dialect/gremlin/encoding/graphson"
)

// Vertex represents a graph vertex.
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/graph/vertex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"

"github.com/facebook/ent/dialect/gremlin/encoding/graphson"
"entgo.io/ent/dialect/gremlin/encoding/graphson"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"net/http"
"net/url"

"github.com/facebook/ent/dialect/gremlin/encoding/graphson"
"entgo.io/ent/dialect/gremlin/encoding/graphson"

jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"net/http/httptest"
"testing"

"github.com/facebook/ent/dialect/gremlin/encoding/graphson"
"entgo.io/ent/dialect/gremlin/encoding/graphson"

jsoniter "github.com/json-iterator/go"
"github.com/stretchr/testify/assert"
Expand Down
6 changes: 3 additions & 3 deletions dialect/gremlin/internal/ws/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"sync"
"time"

"github.com/facebook/ent/dialect/gremlin"
"github.com/facebook/ent/dialect/gremlin/encoding"
"github.com/facebook/ent/dialect/gremlin/encoding/graphson"
"entgo.io/ent/dialect/gremlin"
"entgo.io/ent/dialect/gremlin/encoding"
"entgo.io/ent/dialect/gremlin/encoding/graphson"

"github.com/gorilla/websocket"
"github.com/pkg/errors"
Expand Down
4 changes: 2 additions & 2 deletions dialect/gremlin/internal/ws/conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"sync"
"testing"

"github.com/facebook/ent/dialect/gremlin"
"github.com/facebook/ent/dialect/gremlin/encoding/graphson"
"entgo.io/ent/dialect/gremlin"
"entgo.io/ent/dialect/gremlin/encoding/graphson"

"github.com/gorilla/websocket"
"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/ocgremlin/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package ocgremlin
import (
"context"

"github.com/facebook/ent/dialect/gremlin"
"entgo.io/ent/dialect/gremlin"

"go.opencensus.io/trace"
)
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/ocgremlin/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"errors"
"testing"

"github.com/facebook/ent/dialect/gremlin"
"entgo.io/ent/dialect/gremlin"

"github.com/stretchr/testify/mock"
"go.opencensus.io/trace"
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/ocgremlin/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"
"time"

"github.com/facebook/ent/dialect/gremlin"
"entgo.io/ent/dialect/gremlin"

"go.opencensus.io/stats"
"go.opencensus.io/stats/view"
Expand Down
4 changes: 2 additions & 2 deletions dialect/gremlin/ocgremlin/stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"
"testing"

"github.com/facebook/ent/dialect/gremlin"
"github.com/facebook/ent/dialect/gremlin/encoding/graphson"
"entgo.io/ent/dialect/gremlin"
"entgo.io/ent/dialect/gremlin/encoding/graphson"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/ocgremlin/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"context"
"fmt"

"github.com/facebook/ent/dialect/gremlin"
"entgo.io/ent/dialect/gremlin"

"go.opencensus.io/trace"
)
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/ocgremlin/trace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"fmt"
"testing"

"github.com/facebook/ent/dialect/gremlin"
"entgo.io/ent/dialect/gremlin"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
Expand Down
2 changes: 1 addition & 1 deletion dialect/gremlin/request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"time"

"github.com/facebook/ent/dialect/gremlin/encoding/graphson"
"entgo.io/ent/dialect/gremlin/encoding/graphson"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
4 changes: 2 additions & 2 deletions dialect/gremlin/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
package gremlin

import (
"github.com/facebook/ent/dialect/gremlin/encoding/graphson"
"github.com/facebook/ent/dialect/gremlin/graph"
"entgo.io/ent/dialect/gremlin/encoding/graphson"
"entgo.io/ent/dialect/gremlin/graph"

"github.com/pkg/errors"
)
Expand Down
4 changes: 2 additions & 2 deletions dialect/gremlin/response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"reflect"
"testing"

"github.com/facebook/ent/dialect/gremlin/encoding/graphson"
"github.com/facebook/ent/dialect/gremlin/graph"
"entgo.io/ent/dialect/gremlin/encoding/graphson"
"entgo.io/ent/dialect/gremlin/graph"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion dialect/sql/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"strconv"
"strings"

"github.com/facebook/ent/dialect"
"entgo.io/ent/dialect"
)

// Querier wraps the basic Query method that is implemented
Expand Down
2 changes: 1 addition & 1 deletion dialect/sql/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"testing"

"github.com/facebook/ent/dialect"
"entgo.io/ent/dialect"
"github.com/stretchr/testify/require"
)

Expand Down

0 comments on commit dd4792f

Please sign in to comment.