Browse Source

Changed readme

Signed-off-by: Vishal Rana <vr@labstack.com>
Vishal Rana 10 years ago
parent
commit
955dbf2925
2 changed files with 8 additions and 7 deletions
  1. 6 5
      color/README.md
  2. 2 2
      color/color_test.go

+ 6 - 5
color/README.md

@@ -6,8 +6,8 @@ Style terminal text.
 
 
 ### Usage
 ### Usage
 [labstack/gommon/color](https://github.com/labstack/gommon/blob/master/color/color_test.go)
 [labstack/gommon/color](https://github.com/labstack/gommon/blob/master/color/color_test.go)
-```go
 // Colored text
 // Colored text
+```go
 fmt.Println(color.Black("black"))
 fmt.Println(color.Black("black"))
 fmt.Println(color.Red("red"))
 fmt.Println(color.Red("red"))
 fmt.Println(color.Green("green"))
 fmt.Println(color.Green("green"))
@@ -20,8 +20,8 @@ fmt.Println(color.Grey("grey"))
 ```
 ```
 ![Colored Text](http://i.imgur.com/8RtY1QR.png)
 ![Colored Text](http://i.imgur.com/8RtY1QR.png)
 
 
-```go
 // Colored background
 // Colored background
+```go
 fmt.Println(color.BlackBg("black background", color.Wht))
 fmt.Println(color.BlackBg("black background", color.Wht))
 fmt.Println(color.RedBg("red background"))
 fmt.Println(color.RedBg("red background"))
 fmt.Println(color.GreenBg("green background"))
 fmt.Println(color.GreenBg("green background"))
@@ -33,8 +33,8 @@ fmt.Println(color.WhiteBg("white background"))
 ```
 ```
 ![Colored Background](http://i.imgur.com/SrrS6lw.png)
 ![Colored Background](http://i.imgur.com/SrrS6lw.png)
 
 
-```go
 // Emphasis
 // Emphasis
+```go
 fmt.Println(color.Bold("bold"))
 fmt.Println(color.Bold("bold"))
 fmt.Println(color.Dim("dim"))
 fmt.Println(color.Dim("dim"))
 fmt.Println(color.Italic("italic"))
 fmt.Println(color.Italic("italic"))
@@ -44,12 +44,13 @@ fmt.Println(color.Hidden("hidden"))
 fmt.Println(color.Strikeout("strikeout"))
 fmt.Println(color.Strikeout("strikeout"))
 ```
 ```
 ![Emphasis](http://i.imgur.com/3RSJBbc.png)
 ![Emphasis](http://i.imgur.com/3RSJBbc.png)
+
+// Mix and match
 ```go
 ```go
-// Combo
 fmt.Println(Green("bold green with white background", B, WhtBg))
 fmt.Println(Green("bold green with white background", B, WhtBg))
 fmt.Println(Red("underline red", U))
 fmt.Println(Red("underline red", U))
 fmt.Println(Yellow("dim yellow", D))
 fmt.Println(Yellow("dim yellow", D))
 fmt.Println(Cyan("inverse cyan", In))
 fmt.Println(Cyan("inverse cyan", In))
 fmt.Println(Blue("bold underline dim blue", B, U, D))
 fmt.Println(Blue("bold underline dim blue", B, U, D))
 ```
 ```
-![Combo](http://i.imgur.com/jWGq9Ca.png)
+![Mix and match](http://i.imgur.com/jWGq9Ca.png)

+ 2 - 2
color/color_test.go

@@ -43,8 +43,8 @@ func TestEmphasis(t *testing.T) {
 	fmt.Println(color.Strikeout("strikeout"))
 	fmt.Println(color.Strikeout("strikeout"))
 }
 }
 
 
-func TestCombo(t *testing.T) {
-	fmt.Println("*** combo ***")
+func TestMixMatch(t *testing.T) {
+	fmt.Println("*** mix and match ***")
 	fmt.Println(Green("bold green with white background", B, WhtBg))
 	fmt.Println(Green("bold green with white background", B, WhtBg))
 	fmt.Println(Red("underline red", U))
 	fmt.Println(Red("underline red", U))
 	fmt.Println(Yellow("dim yellow", D))
 	fmt.Println(Yellow("dim yellow", D))