Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Dec 26, 2013
@alimoeeny alimoeeny no fatal, you don't want things to blow up
it's just a color problem, you tried to print an email address, things shouldn't blow up
ac433e4
Commits on Dec 30, 2013
@wsxiaoys Merge pull request #5 from alimoeeny/master
no fatal, you don't want things to blow up
5668e43
Showing with 5 additions and 3 deletions.
  1. +5 −3 color/color.go
View
8 color/color.go
@@ -82,7 +82,7 @@ func Colorize(x string) string {
c, ok := codeMap[int(key)]
switch {
case !ok:
- log.Fatalf("Wrong color syntax: %c", key)
+ log.Printf("Wrong color syntax: %c", key)
case 0 <= c && c <= 8:
attr = c
case 30 <= c && c <= 37:
@@ -99,7 +99,8 @@ func compileColorSyntax(input, output *bytes.Buffer) {
i, _, err := input.ReadRune()
if err != nil {
// EOF got
- log.Fatal("Parse failed on color syntax")
+ log.Print("Parse failed on color syntax")
+ return
}
switch i {
@@ -110,7 +111,8 @@ func compileColorSyntax(input, output *bytes.Buffer) {
for {
i, _, err := input.ReadRune()
if err != nil {
- log.Fatal("Parse failed on color syntax")
+ log.Print("Parse failed on color syntax")
+ break
}
if i == '}' {
break

No commit comments for this range

Something went wrong with that request. Please try again.