diff options
Diffstat (limited to 'vendor/github.com/fatih/color')
-rw-r--r-- | vendor/github.com/fatih/color/.travis.yml | 5 | ||||
-rw-r--r-- | vendor/github.com/fatih/color/README.md | 2 | ||||
-rw-r--r-- | vendor/github.com/fatih/color/color.go | 15 |
3 files changed, 16 insertions, 6 deletions
diff --git a/vendor/github.com/fatih/color/.travis.yml b/vendor/github.com/fatih/color/.travis.yml deleted file mode 100644 index 57b4b57c8..000000000 --- a/vendor/github.com/fatih/color/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: go -go: - - 1.6 - - tip - diff --git a/vendor/github.com/fatih/color/README.md b/vendor/github.com/fatih/color/README.md index 7c8eea20e..25abbca3f 100644 --- a/vendor/github.com/fatih/color/README.md +++ b/vendor/github.com/fatih/color/README.md @@ -87,7 +87,7 @@ blue(myWriter, "important notice: %s", stars) // Mix up with multiple attributes success := color.New(color.Bold, color.FgGreen).FprintlnFunc() -success(myWriter, don't forget this...") +success(myWriter, "Don't forget this...") ``` ### Insert into noncolor strings (SprintFunc) diff --git a/vendor/github.com/fatih/color/color.go b/vendor/github.com/fatih/color/color.go index dba8f211e..34cd8e4c8 100644 --- a/vendor/github.com/fatih/color/color.go +++ b/vendor/github.com/fatih/color/color.go @@ -247,6 +247,21 @@ func (c *Color) Println(a ...interface{}) (n int, err error) { return fmt.Fprintln(Output, a...) } +// Sprint is just like Print, but returns a string instead of printing it. +func (c *Color) Sprint(a ...interface{}) string { + return c.wrap(fmt.Sprint(a...)) +} + +// Sprintln is just like Println, but returns a string instead of printing it. +func (c *Color) Sprintln(a ...interface{}) string { + return c.wrap(fmt.Sprintln(a...)) +} + +// Sprintf is just like Printf, but returns a string instead of printing it. +func (c *Color) Sprintf(format string, a ...interface{}) string { + return c.wrap(fmt.Sprintf(format, a...)) +} + // FprintFunc returns a new function that prints the passed arguments as // colorized with color.Fprint(). func (c *Color) FprintFunc() func(w io.Writer, a ...interface{}) { |