Commit Graph

13 Commits

Author SHA1 Message Date
Travis Cline
4abb259989 cmd/ent: Attach Funcs for ent new templates (#3336) 2023-02-21 06:57:31 +02:00
Rotem Tamir
102f60ac12 cmd/internal/base: fix type on print sub-command (#3335) 2023-02-20 13:52:09 +02:00
Giau. Tran Minh
f4bdc36e85 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>
2023-02-12 13:56:18 +02:00
Ariel Mashraki
2c63d1d70e all: gofmt -w -r 'interface{} -> any' (#2874) 2022-08-19 18:23:04 +03:00
Daniel Huckins
f9dfac628b cmd/ent: add support for --template in init command (#2728)
* allow init cmd to have a template file or string

* add example

* dead code

* only use path

* Apply suggestions from code review

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>

* fix lint

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2022-07-27 21:23:08 +03:00
Andy Day
2e906bffa2 cmd/ent: Add check that model file doesn't already exist on ent init (#2307)
Previously if you run  it would overwrite an existing file  if that already existed. Now  checks if that file already exists, and returns an error if so.
2022-02-03 01:44:04 +02:00
Ariel Mashraki
11843ff867 go: upgrade to 1.17 2021-08-21 00:14:22 +03:00
森 優太
e52439c5be cmd/ent: fix //go:generate code generation to match go1.16 (#1300)
* doc: fix github link

* doc: fix Link entgo.io -> github.com/ent

* 🎉 first commit

* update go generate style

* doc: update go get to go install

* doc: update versioning with go install

* restore all

* change generate.go content

* add -mod=mod option

* add -mod=mod option
2021-03-09 22:00:33 +02:00
Matthew Gabeler-Lee
c53b45ddb0 all: use %w instead of %v to wrap errors (#1275)
* all: use %w instead of %v for nested errors with fmt.Errorf

* all: update generated code to use %w instead of %v for error wrapping
2021-03-03 20:05:33 +02:00
Ariel Mashraki
dd4792f5b3 go: rename module from github.com/facebook/ent => entgo.io/ent (#1226) 2021-02-02 23:03:04 +02:00
Nathaniel Peiffer
cfefd26543 cmd/internal/base: add name conflict check for init command (#1110)
* adds checks for name conflicts
also tidies up error handling inside init

* fix failing test, check for lower name for golang idents

* update function name and prefer builtin function

* pkg instead of lowerName
2021-01-02 22:25:39 +02:00
Nathaniel Peiffer
e37995be31 cmd/internal/base: more informative comment (#1116) 2021-01-02 09:29:47 +02:00
Ariel Mashraki
b77d2d4277 cmd/ent: replace entc with ent (#989)
See #981
2020-11-29 10:23:24 +02:00