summaryrefslogtreecommitdiff
path: root/cmd/rr/utils/cprint.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-07-08 21:12:01 -0700
committerWolfy-J <[email protected]>2018-07-08 21:12:01 -0700
commitca92fcaf9b2290b3bf2124eed6b0db6860010712 (patch)
treec7204f989798b61775f9c7a27f6f7d35a222c9ac /cmd/rr/utils/cprint.go
parent5f36cab25482341458d8013bfe95900fdf62456d (diff)
mod updated
Diffstat (limited to 'cmd/rr/utils/cprint.go')
-rw-r--r--cmd/rr/utils/cprint.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/cmd/rr/utils/cprint.go b/cmd/rr/utils/cprint.go
deleted file mode 100644
index 020975ec..00000000
--- a/cmd/rr/utils/cprint.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package utils
-
-import (
- "fmt"
- "github.com/mgutz/ansi"
- "regexp"
- "strings"
-)
-
-var reg *regexp.Regexp
-
-func init() {
- reg, _ = regexp.Compile(`<([^>]+)>`)
-}
-
-// Printf works identically to fmt.Print but adds `<white+hb>color formatting support for CLI</reset>`.
-func Printf(format string, args ...interface{}) {
- fmt.Print(Sprintf(format, args...))
-}
-
-// Sprintf works identically to fmt.Sprintf but adds `<white+hb>color formatting support for CLI</reset>`.
-func Sprintf(format string, args ...interface{}) string {
- format = reg.ReplaceAllStringFunc(format, func(s string) string {
- return ansi.ColorCode(strings.Trim(s, "<>/"))
- })
-
- return fmt.Sprintf(format, args...)
-}