ent

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAdd

func RunAdd(cmd *cobra.Command, args []string) error

func RunGenerate

func RunGenerate(cmd *cobra.Command, args []string) error

Types

type EntCmd

type EntCmd struct {
	Args      []string
	TargetDir string
	Timeout   time.Duration
	// contains filtered or unexported fields
}

EntCmd 封装 ent 命令调用的数据和行为。

func NewEntCmd

func NewEntCmd(targetDir string) *EntCmd

func (*EntCmd) RunGenerate

func (e *EntCmd) RunGenerate(extraArgs ...string) error

RunGenerate 使用优先使用项目内的 go run,如果失败则尝试全局 ent 可执行程序来执行 `ent generate`。 extraArgs 可传入像 `--feature` 这样的额外参数。

func (*EntCmd) RunNew

func (e *EntCmd) RunNew(names []string) error

RunNew 使用优先使用项目内的 go run,如果失败则尝试全局 ent 可执行程序来执行 `ent new`。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL