mirror of
https://github.com/ent/ent.git
synced 2026-04-28 05:30:56 +03:00
cmd/ent: rename init to new (#3311)
* cmd: rename init to new Signed-off-by: Giau. Tran Minh <hello@giautm.dev> * doc: update guide to use new command Signed-off-by: Giau. Tran Minh <hello@giautm.dev> --------- Signed-off-by: Giau. Tran Minh <hello@giautm.dev>
This commit is contained in:
@@ -29,7 +29,7 @@ go get -d entgo.io/ent/cmd/ent
|
||||
```
|
||||
|
||||
```console
|
||||
go run -mod=mod entgo.io/ent/cmd/ent init Todo
|
||||
go run -mod=mod entgo.io/ent/cmd/ent new Todo
|
||||
```
|
||||
|
||||
After installing Ent and running `ent init`, your project directory should look like this:
|
||||
@@ -49,7 +49,7 @@ entity schemas.
|
||||
|
||||
## Code Generation
|
||||
|
||||
When we ran `ent init Todo` above, a schema named `Todo` was created in the `todo.go` file under the`todo/ent/schema/` directory:
|
||||
When we ran `ent new Todo` above, a schema named `Todo` was created in the `todo.go` file under the`todo/ent/schema/` directory:
|
||||
|
||||
```go
|
||||
package schema
|
||||
|
||||
Reference in New Issue
Block a user