Documentation ¶
Index ¶
- type Flags
- type T
- func (t *T) Error(args ...interface{})
- func (t *T) Errorf(format string, args ...interface{})
- func (t *T) Exec(cmd ...string) (err error)
- func (t *T) Fail()
- func (t *T) Failed() bool
- func (t *T) Fatal(args ...interface{})
- func (t *T) Fatalf(format string, args ...interface{})
- func (t *T) Log(args ...interface{})
- func (t *T) Logf(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
type T struct { Args []string // command-line arguments Flags Flags // command-line options // contains filtered or unexported fields }
T is a type that is passed through to each task function. T can be used to retrieve context-specific Args and parsed command-line Flags.
func (*T) Error ¶
func (t *T) Error(args ...interface{})
Error is equivalent to Log followed by Fail.
func (*T) Exec ¶
Exec runs the system command. If multiple arguments are given, they're concatenated to one command.
Example:
t.Exec("ls -ltr") t.Exec("ls", FILE1, FILE2)
func (*T) Fatal ¶
func (t *T) Fatal(args ...interface{})
Fatal is equivalent to Error followed by a call to os.Exit(1).
Click to show internal directories.
Click to hide internal directories.