Documentation
¶
Overview ¶
Package formatter is a generated GoMock package.
Package formatter provides the formatter for the spotlike.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Blue is a proxy of fatih/color.Blue. Blue = color.New(color.FgBlue).SprintFunc() // Green is a proxy of fatih/color.Green. Green = color.New(color.FgGreen).SprintFunc() // Red is a proxy of fatih/color.Red. Red = color.New(color.FgRed).SprintFunc() // Yellow is a proxy of fatih/color.Yellow. Yellow = color.New(color.FgYellow).SprintFunc() )
var ( // Tu is a variable to store the table writer with the default values for injecting the dependencies in testing. Tu = utility.NewTableWriterUtil(proxy.NewTableWriter()) )
Functions ¶
func AppendErrorToOutput ¶
AppendErrorToOutput appends an error to the output.
Types ¶
type MockFormatter ¶
type MockFormatter struct {
// contains filtered or unexported fields
}
MockFormatter is a mock of Formatter interface.
func NewMockFormatter ¶
func NewMockFormatter(ctrl *gomock.Controller) *MockFormatter
NewMockFormatter creates a new mock instance.
func (*MockFormatter) EXPECT ¶
func (m *MockFormatter) EXPECT() *MockFormatterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockFormatterMockRecorder ¶
type MockFormatterMockRecorder struct {
// contains filtered or unexported fields
}
MockFormatterMockRecorder is the mock recorder for MockFormatter.
type NewFormatterFunc ¶
NewFormatterFunc is a function type that defines the signature for creating a new Formatter.
var NewFormatter NewFormatterFunc = func(format string) (Formatter, error) { var f Formatter switch format { case "plain": f = NewPlainFormatter() case "table": f = NewTableFormatter() default: return nil, errors.New("invalid format") } return f, nil }
NewFormatter is a function that returns a new instance of the Formatter interface.
type PlainFormatter ¶
type PlainFormatter struct{}
PlainFormatter is a struct that formats the output of spotlike cli.
func NewPlainFormatter ¶
func NewPlainFormatter() *PlainFormatter
NewPlainFormatter returns a new instance of the PlainFormatter struct.
type TableFormatter ¶
type TableFormatter struct{}
TableFormatter is a struct that formats the output of spotlike cli.
func NewTableFormatter ¶
func NewTableFormatter() *TableFormatter
NewTableFormatter returns a new instance of the TableFormatter struct.