diff --git a/color_test.go b/color_test.go index 68df26f..eab9818 100644 --- a/color_test.go +++ b/color_test.go @@ -436,6 +436,25 @@ func TestQuickFunc(t *testing.T) { } fmt.Println() + // format func + testFuncs2 := []func(tpl string, vs ...interface{}){ + Redf, + Bluef, + Cyanf, + Grayf, + Greenf, + Yellowf, + Magentaf, + } + fmt.Println("--- quick format message print:") + for i, fn := range testFuncs2 { + if i == 3 { + fmt.Println() + } + fn("format %s,", "message") + } + fmt.Println() + // line func testFuncs = []func(...interface{}){ Redln, diff --git a/go.mod b/go.mod index 13ebff3..3e68bd9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/gookit/color -go 1.13 +go 1.14 require ( github.com/stretchr/testify v1.7.2