mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
go: rename module from github.com/facebook/ent => entgo.io/ent (#1226)
This commit is contained in:
@@ -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"
|
||||
)
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user