helpers: Golint fixes

This commit is contained in:
Bjørn Erik Pedersen
2016-11-05 17:05:33 +01:00
parent 72156e403c
commit d4830fc4fd
2 changed files with 5 additions and 0 deletions

View File

@@ -288,10 +288,13 @@ func AddContextRoot(baseURL, relativePath string) string {
return newPath
}
// URLizeAndPrep applies misc sanitation to the given URL to get it in line
// with the Hugo standard.
func (p *PathSpec) URLizeAndPrep(in string) string {
return URLPrep(p.uglyURLs, p.URLize(in))
}
// URLPrep applies misc sanitation to the given URL.
func URLPrep(ugly bool, in string) string {
if ugly {
x := Uglify(SanitizeURL(in))