Documentation ¶
Index ¶
- func BuildImport(pkg string) string
- func CloneSrc(dir, src string) error
- func Error(msg string, args ...interface{})
- func FileExist(file string) bool
- func FindGoModFile() (string, error)
- func GetBeanFileName(bean interface{}) string
- func GetBeanStructName(bean interface{}) string
- func GetPkgName() (string, error)
- func IsFileContains(sub string, openFile OpenFileHandler) (bool, error)
- func MkDir(dir string) error
- func OpenFile(path string, mode int) (*os.File, error)
- func OpenOrCreateFile(path string, mode int) (file *os.File, exists bool, err error)
- func PipeOutput(cmd *exec.Cmd, pipe func(line []byte)) error
- func ReadFile(openFile OpenFileHandler) ([]byte, error)
- func ReplaceFileContents(oldString, newString string, n int, openFile OpenFileHandler) error
- func Scan(placeHolder string, ptr interface{}) error
- func TemporaryEntry(dir string) (back func() error, err error)
- func WriteFunction(fileName, receiver string, isPtr bool, ...) error
- func WriteImports(fileName string, imports []string) error
- type GoCmd
- func (g *GoCmd) Exec(args ...string) error
- func (g *GoCmd) ExecWithoutOutput(args ...string) error
- func (g *GoCmd) Fmt(paths ...string)
- func (g *GoCmd) FmtAll(dir ...string)
- func (g *GoCmd) Get(pkg string)
- func (g *GoCmd) ModInit(pkg string)
- func (g *GoCmd) ModTidy()
- func (g *GoCmd) Run(file string)
- type OpenFileHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildImport ¶ added in v1.4.1
func FindGoModFile ¶ added in v1.4.1
func GetBeanFileName ¶ added in v1.4.0
func GetBeanFileName(bean interface{}) string
func GetBeanStructName ¶ added in v1.4.0
func GetBeanStructName(bean interface{}) string
func GetPkgName ¶
func IsFileContains ¶ added in v1.4.0
func IsFileContains(sub string, openFile OpenFileHandler) (bool, error)
func OpenOrCreateFile ¶ added in v1.4.0
func ReadFile ¶ added in v1.4.0
func ReadFile(openFile OpenFileHandler) ([]byte, error)
func ReplaceFileContents ¶ added in v1.4.0
func ReplaceFileContents(oldString, newString string, n int, openFile OpenFileHandler) error
func TemporaryEntry ¶ added in v1.4.0
func WriteFunction ¶ added in v1.4.0
func WriteImports ¶ added in v1.4.0
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.