1
0
mirror of https://github.com/directorz/mailfull-go.git synced 2025-12-17 17:47:04 +00:00
Files
mailfull-go/cmd/meta.go
2017-07-25 11:40:51 +09:00

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...)
}