diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-12-02 15:23:25 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-12-03 15:12:58 +0300 |
commit | d90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch) | |
tree | 7b1b14464eefec1188ca2eed53c64e4823453cc9 /helpers/url.go | |
parent | 32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff) |
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'helpers/url.go')
-rw-r--r-- | helpers/url.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/helpers/url.go b/helpers/url.go index 1e88def9e..6f4242b09 100644 --- a/helpers/url.go +++ b/helpers/url.go @@ -83,7 +83,7 @@ func sanitizeURLWithFlags(in string, f purell.NormalizationFlags) string { return u.String() // End temporary kludge - //return s + // return s } @@ -103,7 +103,6 @@ func SanitizeURLKeepTrailingSlash(in string) string { // urlize: vim-text-editor func (p *PathSpec) URLize(uri string) string { return p.URLEscape(p.MakePathSanitized(uri)) - } // URLizeFilename creates an URL from a filename by esacaping unicode letters @@ -130,7 +129,6 @@ func (p *PathSpec) URLEscape(uri string) string { // path: post/how-i-blog // result: http://spf13.com/post/how-i-blog func MakePermalink(host, plink string) *url.URL { - base, err := url.Parse(host) if err != nil { panic(err) @@ -275,7 +273,6 @@ func (p *PathSpec) RelURL(in string, addLanguage bool) string { // For relative URL entries on sites with a base url with a context root set (i.e. http://example.com/mysite), // relative URLs must not include the context root if canonifyURLs is enabled. But if it's disabled, it must be set. func AddContextRoot(baseURL, relativePath string) string { - url, err := url.Parse(baseURL) if err != nil { panic(err) |