Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnnouncementArgs ¶ added in v0.0.3
type AnnouncementArgs struct {
// contains filtered or unexported fields
}
AnnouncementArgs stores contexts.
func Args ¶ added in v0.0.3
func Args() *AnnouncementArgs
Args initialize AnnouncementArgs with empty context.
func (*AnnouncementArgs) AddContext ¶ added in v0.0.3
func (cb *AnnouncementArgs) AddContext(field string, value string, emphasize ...bool) *AnnouncementArgs
AddContext adds key-valued context to the announcement.
type Announcer ¶
type Announcer struct {
// contains filtered or unexported fields
}
Announcer is the struct that prints announcement to console or terminal.
func New ¶
func New() *Announcer
New instantiates Announcer struct with sensible defaults. Currently the API does not expose any means to customize the Formatting or symbols.
func (*Announcer) Error ¶
func (ann *Announcer) Error(msg string, cb ...*AnnouncementArgs)
Error tells a error. Emphasis bar is red. Emits in stderr.
func (*Announcer) Tell ¶
func (ann *Announcer) Tell(msg string, cb ...*AnnouncementArgs)
Tell tells an announcement.
func (*Announcer) Warn ¶
func (ann *Announcer) Warn(msg string, cb ...*AnnouncementArgs)
Warn tells a warning. Emphasis bar is yellow color.
Click to show internal directories.
Click to hide internal directories.