Browse Source

Capitalize first letters of error messages

renovate/configure
Yota Toyama 8 years ago
parent
commit
71eded92ec
  1. 11
      url_result.go

11
url_result.go

@ -1,6 +1,10 @@
package main
import "github.com/fatih/color"
import (
"strings"
"github.com/fatih/color"
)
type urlResult struct {
url string
@ -12,5 +16,8 @@ func (r urlResult) String() string {
return color.GreenString("OK") + "\t" + r.url
}
return color.RedString("ERROR") + "\t" + r.url + "\n\t" + color.YellowString(r.err.Error())
s := r.err.Error()
return color.RedString("ERROR") + "\t" + r.url + "\n\t" +
color.YellowString(strings.ToUpper(s[:1])+s[1:])
}

Loading…
Cancel
Save