diff options
author | Anthony Fok <foka@debian.org> | 2015-03-11 11:34:57 -0600 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-03-11 21:55:00 +0100 |
commit | 67df33f50069445d53d373790e8c636e47013a72 (patch) | |
tree | c4e9d646f32aa2a7a40e6c5597b904647bc85e3f /transform/absurl.go | |
parent | 00f07c5374d859057c6e7c4731000b5978364819 (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 'transform/absurl.go')
-rw-r--r-- | transform/absurl.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/transform/absurl.go b/transform/absurl.go index 0efe624ac..12f616eea 100644 --- a/transform/absurl.go +++ b/transform/absurl.go @@ -4,12 +4,12 @@ import ( "sync" ) -var absUrlInit sync.Once -var ar *absurlReplacer +var absURLInit sync.Once +var ar *absURLReplacer // for performance reasons, we reuse the first baseUrl given func initAbsurlReplacer(baseURL string) { - absUrlInit.Do(func() { + absURLInit.Do(func() { ar = newAbsurlReplacer(baseURL) }) } @@ -18,7 +18,7 @@ func AbsURL(absURL string) (trs []link, err error) { initAbsurlReplacer(absURL) trs = append(trs, func(content []byte) []byte { - return ar.replaceInHtml(content) + return ar.replaceInHTML(content) }) return } @@ -27,7 +27,7 @@ func AbsURLInXML(absURL string) (trs []link, err error) { initAbsurlReplacer(absURL) trs = append(trs, func(content []byte) []byte { - return ar.replaceInXml(content) + return ar.replaceInXML(content) }) return } |