Documentation
¶
Index ¶
- Variables
- type Printer
- type Script
- type ScriptPrint
- func (s *ScriptPrint) CommentPrintf(format string, args ...interface{}) (n int, err error)
- func (s *ScriptPrint) Cprintf(color string, format string, args ...interface{}) (n int, err error)
- func (s *ScriptPrint) DebugMessage(msg string, comment string)
- func (s *ScriptPrint) Error(err error)
- func (s *ScriptPrint) Message(msg string, color string, comment string)
- type SimplePrint
Constants ¶
This section is empty.
Variables ¶
View Source
var ColorCodes = map[string]map[string]string{
"green": {
"code": "\x1b[32m",
"quoted": "\"\\e[32m\"",
},
"red": {
"code": "\x1b[31m",
"quoted": "\"\\e[31m\"",
},
"yellow": {
"code": "\x1b[33m",
"quoted": "\"\\e[33m\"",
},
"stop": {
"code": "\x1b[0m",
"quoted": "\"\\e[0m\"",
},
}
Functions ¶
This section is empty.
Types ¶
type Script ¶
type Script struct {
Printer *ScriptPrint
}
func (*Script) PrintBinaryAliasFunction ¶
PrintBinaryAliasFunction prints a shell script with alias function TODO Add script block to prevent from loading not in bash/zsh shells (as in rvm script)
type ScriptPrint ¶
type ScriptPrint struct {
}
func NewScriptPrint ¶
func NewScriptPrint() *ScriptPrint
func (*ScriptPrint) CommentPrintf ¶
func (s *ScriptPrint) CommentPrintf(format string, args ...interface{}) (n int, err error)
func (*ScriptPrint) Cprintf ¶
func (s *ScriptPrint) Cprintf(color string, format string, args ...interface{}) (n int, err error)
func (*ScriptPrint) DebugMessage ¶
func (s *ScriptPrint) DebugMessage(msg string, comment string)
DebugMessage output a message in gray color
func (*ScriptPrint) Error ¶
func (s *ScriptPrint) Error(err error)
type SimplePrint ¶
type SimplePrint struct {
}
func NewSimplePrint ¶
func NewSimplePrint() *SimplePrint
func (*SimplePrint) Cprintf ¶
func (p *SimplePrint) Cprintf(color string, format string, args ...interface{}) (n int, err error)
func (*SimplePrint) DebugMessage ¶
func (p *SimplePrint) DebugMessage(message, comment string)
func (*SimplePrint) Error ¶
func (p *SimplePrint) Error(err error)
func (*SimplePrint) Message ¶
func (p *SimplePrint) Message(message, color, comment string)
Click to show internal directories.
Click to hide internal directories.