all: Use jww instead of fmt for printing

This is an attempt to unify method for printing.
This commit is contained in:
bogem
2016-11-22 18:47:20 +01:00
committed by Bjørn Erik Pedersen
parent e1da7cb320
commit 120f6b0cf2
8 changed files with 32 additions and 33 deletions

View File

@@ -20,6 +20,7 @@ import (
"strings"
"github.com/PuerkitoBio/purell"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper"
)
@@ -306,7 +307,7 @@ func URLPrep(ugly bool, in string) string {
}
url, err := purell.NormalizeURLString(x, purell.FlagAddTrailingSlash)
if err != nil {
fmt.Printf("ERROR returned by NormalizeURLString. Returning in = %q\n", in)
jww.ERROR.Printf("Failed to normalize URL string. Returning in = %q\n", in)
return in
}
return url