mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31: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:
@@ -32,7 +32,7 @@ go mod init entdemo
|
||||
Go to the root directory of your project, and run:
|
||||
|
||||
```console
|
||||
go run -mod=mod entgo.io/ent/cmd/ent init User
|
||||
go run -mod=mod entgo.io/ent/cmd/ent new User
|
||||
```
|
||||
|
||||
The command above will generate the schema for `User` under `entdemo/ent/schema/` directory:
|
||||
@@ -264,7 +264,7 @@ Let's create 2 additional entities named `Car` and `Group` with a few fields. We
|
||||
to generate the initial schemas:
|
||||
|
||||
```console
|
||||
go run -mod=mod entgo.io/ent/cmd/ent init Car Group
|
||||
go run -mod=mod entgo.io/ent/cmd/ent new Car Group
|
||||
```
|
||||
|
||||
And then we add the rest of the fields manually:
|
||||
|
||||
Reference in New Issue
Block a user