diff options
Diffstat (limited to 'tpl/urls/urls.go')
-rw-r--r-- | tpl/urls/urls.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tpl/urls/urls.go b/tpl/urls/urls.go index 54c94ec17..8f6f92f3d 100644 --- a/tpl/urls/urls.go +++ b/tpl/urls/urls.go @@ -17,11 +17,12 @@ import ( "errors" "fmt" - "github.com/russross/blackfriday" - "html/template" "net/url" + _errors "github.com/pkg/errors" + "github.com/russross/blackfriday" + "github.com/gohugoio/hugo/deps" "github.com/spf13/cast" ) @@ -55,7 +56,7 @@ func (ns *Namespace) AbsURL(a interface{}) (template.HTML, error) { func (ns *Namespace) Parse(rawurl interface{}) (*url.URL, error) { s, err := cast.ToStringE(rawurl) if err != nil { - return nil, fmt.Errorf("Error in Parse: %s", err) + return nil, _errors.Wrap(err, "Error in Parse") } return url.Parse(s) |