mirror of
https://github.com/directorz/mailfull-go.git
synced 2025-12-17 17:47:04 +00:00
21 lines
390 B
Go
21 lines
390 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/mitchellh/cli"
|
|
)
|
|
|
|
// Meta contains options to execute a command.
|
|
type Meta struct {
|
|
UI *cli.BasicUi
|
|
CmdName string
|
|
SubCmdName string
|
|
Version string
|
|
}
|
|
|
|
// Errorf prints the error to ErrorWriter with the prefix string.
|
|
func (m Meta) Errorf(format string, v ...interface{}) {
|
|
fmt.Fprintf(m.UI.ErrorWriter, "[ERR] "+format, v...)
|
|
}
|