Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompleteResult ¶
type IApplication ¶
type IApplication interface { SetName(value string) GetName() string SetCmd(value string) GetCmd() string SetPrintCh(value chan string) GetPrintCh() chan string SetWorkPath(value string) GetWorkPath() string SetTimeOut(value time.Duration) GetTimeOut() time.Duration SetContext(ctx context.Context) GetContext() context.Context Run(args ...string) error }
func NewIApplication ¶
func NewIApplication(opts ...Option) IApplication
NewIApplication create an application
Example ¶
app := NewIApplication( WithCmd("go"), WithPrintCh(), WithName("go应用"), WithContext(context.Background()), WithWorkPath("./"), WithTimeOut(5*time.Second)) err := app.Run("env") if err != nil { fmt.Print(err) }
Output:
Click to show internal directories.
Click to hide internal directories.