Documentation ¶
Index ¶
- Variables
- type OutputPrinter
- func (w *OutputPrinter) ContextInfo(name string, message string, values ...string) string
- func (w *OutputPrinter) Cracked(title string) string
- func (w *OutputPrinter) Failure(title string) string
- func (w *OutputPrinter) GetPen(name PenType) Renderer
- func (w *OutputPrinter) GetWriter() io.Writer
- func (w *OutputPrinter) Heading(title string) string
- func (w *OutputPrinter) InfoMsg(msg string) string
- func (w *OutputPrinter) IsColorized() bool
- func (w *OutputPrinter) NegativeTag(tag string) string
- func (w *OutputPrinter) Pending(title string) string
- func (w *OutputPrinter) PositiveTag(tag string) string
- func (w *OutputPrinter) Printf(format string, args ...interface{}) (n int, err error)
- func (w *OutputPrinter) Println(a ...interface{}) (n int, err error)
- func (w *OutputPrinter) RegularTag(tag string) string
- func (w *OutputPrinter) Section(block string) string
- func (w *OutputPrinter) SectionTitle(title string) string
- func (w *OutputPrinter) SetWriter(writer io.Writer)
- func (w *OutputPrinter) Skipped(title string) string
- func (w *OutputPrinter) Success(title string) string
- func (w *OutputPrinter) TestCase(title string) string
- func (w *OutputPrinter) TestSuiteTitle(filepath string) string
- func (w *OutputPrinter) WarnMsg(msg string) string
- type OutputPrinterOptions
- type PenType
- type Renderer
Constants ¶
This section is empty.
Variables ¶
View Source
var ColorlessPen = func(a ...interface{}) string { if a == nil || len(a) == 0 { return "" } items := make([]string, 0, len(a)) for _, v := range a { s := fmt.Sprintf("%v", v) if len(s) > 0 { items = append(items, s) } } return strings.Join(items, " ") }
View Source
var Pens map[PenType]Renderer
Functions ¶
This section is empty.
Types ¶
type OutputPrinter ¶
type OutputPrinter struct {
// contains filtered or unexported fields
}
func NewOutputPrinter ¶
func NewOutputPrinter(opts OutputPrinterOptions) (ref *OutputPrinter, err error)
func (*OutputPrinter) ContextInfo ¶
func (w *OutputPrinter) ContextInfo(name string, message string, values ...string) string
func (*OutputPrinter) Cracked ¶
func (w *OutputPrinter) Cracked(title string) string
func (*OutputPrinter) Failure ¶
func (w *OutputPrinter) Failure(title string) string
func (*OutputPrinter) GetPen ¶ added in v1.0.6
func (w *OutputPrinter) GetPen(name PenType) Renderer
func (*OutputPrinter) GetWriter ¶ added in v1.0.8
func (w *OutputPrinter) GetWriter() io.Writer
func (*OutputPrinter) Heading ¶
func (w *OutputPrinter) Heading(title string) string
func (*OutputPrinter) InfoMsg ¶ added in v1.0.6
func (w *OutputPrinter) InfoMsg(msg string) string
func (*OutputPrinter) IsColorized ¶ added in v1.0.6
func (w *OutputPrinter) IsColorized() bool
func (*OutputPrinter) NegativeTag ¶ added in v1.0.6
func (w *OutputPrinter) NegativeTag(tag string) string
func (*OutputPrinter) Pending ¶ added in v1.0.6
func (w *OutputPrinter) Pending(title string) string
func (*OutputPrinter) PositiveTag ¶ added in v1.0.6
func (w *OutputPrinter) PositiveTag(tag string) string
func (*OutputPrinter) Printf ¶
func (w *OutputPrinter) Printf(format string, args ...interface{}) (n int, err error)
func (*OutputPrinter) Println ¶
func (w *OutputPrinter) Println(a ...interface{}) (n int, err error)
func (*OutputPrinter) RegularTag ¶ added in v1.0.6
func (w *OutputPrinter) RegularTag(tag string) string
func (*OutputPrinter) Section ¶
func (w *OutputPrinter) Section(block string) string
func (*OutputPrinter) SectionTitle ¶
func (w *OutputPrinter) SectionTitle(title string) string
func (*OutputPrinter) SetWriter ¶ added in v1.0.8
func (w *OutputPrinter) SetWriter(writer io.Writer)
func (*OutputPrinter) Skipped ¶
func (w *OutputPrinter) Skipped(title string) string
func (*OutputPrinter) Success ¶
func (w *OutputPrinter) Success(title string) string
func (*OutputPrinter) TestCase ¶
func (w *OutputPrinter) TestCase(title string) string
func (*OutputPrinter) TestSuiteTitle ¶
func (w *OutputPrinter) TestSuiteTitle(filepath string) string
func (*OutputPrinter) WarnMsg ¶ added in v1.0.6
func (w *OutputPrinter) WarnMsg(msg string) string
type OutputPrinterOptions ¶
type OutputPrinterOptions interface {
GetNoColor() bool
}
Click to show internal directories.
Click to hide internal directories.