Documentation ¶
Index ¶
- Variables
- func CopyIfNotExist(src string, target ...string) error
- func ErrorIfInt64FieldNotInRange(filename string, value int64, min int64, max int64) error
- func ErrorIfIntFieldNotInRange(filename string, value int, min int, max int) error
- func ErrorIfStringFieldNotInList(filename string, value string, valuelist ...string) error
- func FileExists(pathlist ...string) (bool, error)
- func FindLib(gopathenv string, libname string) (string, error)
- func IsFolder(pathlist ...string) (bool, error)
- func ReplaceLine(path string, from string, to string) (bool, error)
- type Answer
- type Question
- type Task
- func (t *Task) AddJob(jobs ...func() error)
- func (t *Task) ConfirmIf(a *app.Application, conditon bool) (bool, error)
- func (t *Task) Copy(src string, target string) error
- func (t *Task) CopyFiles(files map[string]string) error
- func (t *Task) ErrosIfAnyFileExists() error
- func (t *Task) ErrosIfAnyFileNotExists() error
- func (t *Task) Exec() error
- func (t *Task) ListFiles() []string
- func (t *Task) Render(src string, target string, data interface{}) error
- func (t *Task) RenderFiles(files map[string]string, data interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrGoEnvEmpty = errors.New("Go path env is empty.Please set GOPATH env in yonr shell config.")
View Source
var ErrUserCanceled = errors.New("error user canceled")
View Source
var NewLibNotFoundError = func(lib string) error { return fmt.Errorf(" \"%s\" not found.\nYou should use \"go get -u %s\" to install", lib, lib) }
Functions ¶
func CopyIfNotExist ¶
func FileExists ¶
Types ¶
type Question ¶
func NewQuestion ¶
func NewQuestion() *Question
func NewTrueOrFalseQuestion ¶
func (*Question) ExecIf ¶
func (q *Question) ExecIf(a *app.Application, conditon bool, result interface{}) error
func (*Question) SetDefaultKey ¶
func (*Question) SetDescription ¶
Click to show internal directories.
Click to hide internal directories.