Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorAnthony Fok <foka@debian.org>2015-03-11 20:34:57 +0300
committerbep <bjorn.erik.pedersen@gmail.com>2015-03-11 23:55:00 +0300
commit67df33f50069445d53d373790e8c636e47013a72 (patch)
treec4e9d646f32aa2a7a40e6c5597b904647bc85e3f /target
parent00f07c5374d859057c6e7c4731000b5978364819 (diff)
Correct initialisms as suggested by golint
First step to use initialisms that golint suggests, for example: Line 116: func GetHtmlRenderer should be GetHTMLRenderer as see on http://goreportcard.com/report/spf13/hugo Thanks to @bep for the idea! Note that command-line flags (cobra and pflag) as well as struct fields like .BaseUrl and .Url that are used in Go HTML templates need more work to maintain backward-compatibility, and thus are NOT yet dealt with in this commit. First step in fixing #959.
Diffstat (limited to 'target')
-rw-r--r--target/page.go4
-rw-r--r--target/page_test.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/target/page.go b/target/page.go
index 389089edc..fb081fedb 100644
--- a/target/page.go
+++ b/target/page.go
@@ -16,7 +16,7 @@ type PagePublisher interface {
}
type PagePub struct {
- UglyUrls bool
+ UglyURLs bool
DefaultExtension string
PublishDir string
}
@@ -46,7 +46,7 @@ func (pp *PagePub) Translate(src string) (dest string, err error) {
dir = filepath.Join(pp.PublishDir, dir)
}
- if pp.UglyUrls || file == "index.html" || file == "404.html" {
+ if pp.UglyURLs || file == "index.html" || file == "404.html" {
return filepath.Join(dir, fmt.Sprintf("%s%s", name, ext)), nil
}
diff --git a/target/page_test.go b/target/page_test.go
index ab3b0f1ca..250a3e3d1 100644
--- a/target/page_test.go
+++ b/target/page_test.go
@@ -74,7 +74,7 @@ func TestTranslateUglyUrls(t *testing.T) {
}
for _, test := range tests {
- f := &PagePub{UglyUrls: true}
+ f := &PagePub{UglyURLs: true}
dest, err := f.Translate(filepath.FromSlash(test.content))
if err != nil {
t.Fatalf("Translate returned an unexpected err: %s", err)