Beispiel #1
0
func (p *Paragraph) SendPair(level int, col ColorValue, vars ...interface{}) {
	str := models.CastToStrings(vars)
	var result []string
	for i, word := range str {
		if i%2 == 0 {
			result = append(result, word)
		} else {
			result[len(result)-1] += " " + word
		}
	}
	p.lines = append(p.lines, ParamString{result, level, col})
}
Beispiel #2
0
func PrintInLine(val ...interface{}) {
	out(joinWithSpace(models.CastToStrings(val...)...))
}
Beispiel #3
0
func (p *Paragraph) Send(level int, col ColorValue, vars ...interface{}) {
	str := models.CastToStrings(vars)
	p.lines = append(p.lines, ParamString{str, level, col})
}
Beispiel #4
0
func ColorPrint(col ColorValue, level int, val ...interface{}) {
	str := getIndent(level/2) + joinWithTabs(models.CastToStrings(val...)...)
	out(AddColors(col, str))
}