mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
all: Use jww instead of fmt for printing
This is an attempt to unify method for printing.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
e1da7cb320
commit
120f6b0cf2
@@ -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
|
||||
|
Reference in New Issue
Block a user