Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ProjectContext ¶
type ProjectContext struct { WorkDir string // Name is the root name of the project // eg: go-zero、greet Name string // Path identifies which module a project belongs to, which is module value if it's a go mod project, // or else it is the root name of the project, eg: github.com/sjclijie/go-zero、greet Path string // Dir is the path of the project, eg: /Users/keson/goland/go/go-zero、/Users/keson/go/src/greet Dir string }
func Prepare ¶
func Prepare(workDir string) (*ProjectContext, error)
Prepare checks the project which module belongs to,and returns the path and module. workDir parameter is the directory of the source of generating code, where can be found the project path and the project module,
Click to show internal directories.
Click to hide internal directories.