lint
This commit is contained in:
parent
8e14182645
commit
699b413b2a
|
@ -8,6 +8,8 @@ import (
|
||||||
|
|
||||||
type terminalColor uint32
|
type terminalColor uint32
|
||||||
|
|
||||||
|
// Theme is used to associate color names to integer color values ;
|
||||||
|
// the color names in the theme are available in the colorizing format
|
||||||
type Theme map[string]terminalColor
|
type Theme map[string]terminalColor
|
||||||
|
|
||||||
var theme Theme = make(map[string]terminalColor)
|
var theme Theme = make(map[string]terminalColor)
|
||||||
|
|
|
@ -30,8 +30,8 @@ func Sprintf(format string, a ...interface{}) (string, error) {
|
||||||
cursor = match[1]
|
cursor = match[1]
|
||||||
|
|
||||||
// (2) extract features
|
// (2) extract features
|
||||||
|
var err error
|
||||||
var (
|
var (
|
||||||
err = error(nil)
|
|
||||||
text = ""
|
text = ""
|
||||||
sForeground = ""
|
sForeground = ""
|
||||||
sBackground = ""
|
sBackground = ""
|
||||||
|
@ -76,6 +76,7 @@ func Sprintf(format string, a ...interface{}) (string, error) {
|
||||||
return output, nil
|
return output, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Printf prints a terminal-colorized output following the coloring format
|
||||||
func Printf(format string, a ...interface{}) error {
|
func Printf(format string, a ...interface{}) error {
|
||||||
s, err := Sprintf(format, a...)
|
s, err := Sprintf(format, a...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue