helpers: Golint fixes
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 5 Nov 2016 16:05:33 +0000 (17:05 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 5 Nov 2016 16:28:14 +0000 (17:28 +0100)
helpers/pathspec.go
helpers/url.go

index 4c578cdf7a86725149f03263e57926e86ac6594e..d95dcde7a05b09073c6915cf9fd8eab830f0ccd6 100644 (file)
@@ -35,6 +35,7 @@ type PathSpec struct {
        multilingual                   bool
 }
 
+// NewPathSpecFromConfig creats a new PathSpec from the given ConfigProvider.
 func NewPathSpecFromConfig(config ConfigProvider) *PathSpec {
        return &PathSpec{
                disablePathToLower:             config.GetBool("disablePathToLower"),
@@ -49,6 +50,7 @@ func NewPathSpecFromConfig(config ConfigProvider) *PathSpec {
        }
 }
 
+// PaginatePath returns the configured root path used for paginator pages.
 func (p *PathSpec) PaginatePath() string {
        return p.paginatePath
 }
index 3c178f0ff5cb317fc05d66b6d8670b078ab8ef14..922d4aa80e88393db3d53941dc212350c9273b8b 100644 (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))