Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Module ¶
Module contains the relative data of go module, which is the result of the command go list
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: bitbucket.org/hokego/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 }
ProjectContext is a structure for the project, which contains WorkDir, Name, Path and Dir
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.