Skip to content

Commit

Permalink
Add color code
Browse files Browse the repository at this point in the history
  • Loading branch information
mkchoi212 committed Dec 29, 2017
1 parent 6d16fc2 commit b023acc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions color.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package main

import "fmt"

func Red(s string) string {
return fmt.Sprintf("\033[3%d;%dm%s\033[0m", 1, 1, s)
}

func Green(s string) string {
return fmt.Sprintf("\033[3%d;%dm%s\033[0m", 2, 1, s)
}

0 comments on commit b023acc

Please sign in to comment.