More initialism corrections (golint)

Thanks to @bep's new, brilliant helpers.Deprecated() function,
the following functions or variables are transitioned to their
new names, preserving backward compatibility for v0.14
and warning the user of upcoming obsolescence in v0.15:

 * .Url → .URL (for node, menu and paginator)
 * .Site.BaseUrl → .Site.BaseURL
 * .Site.Indexes → .Site.Taxonomies
 * .Site.Recent → .Site.Pages
 * getJson → getJSON
 * getCsv → getCSV
 * safeHtml → safeHTML
 * safeCss → safeCSS
 * safeUrl → safeURL

Also fix related initialisms in strings and comments.

Continued effort in fixing #959.
This commit is contained in:
Anthony Fok 2015-03-17 22:16:54 -07:00 committed by bep
parent ca69cad8aa
commit 8b8fb417ae
20 changed files with 184 additions and 129 deletions

View file

@ -35,7 +35,7 @@ func TestPermalink(t *testing.T) {
{"x/y/z/boofar.md", "x/y/z/", "http://barnew/boo/", "boofar", "", true, true, "http://barnew/boo/x/y/z/boofar.html", "/x/y/z/boofar.html"},
{"x/y/z/boofar.md", "x/y/z/", "http://barnew/boo", "boofar", "", true, true, "http://barnew/boo/x/y/z/boofar.html", "/x/y/z/boofar.html"},
// test url overrides
// test URL overrides
{"x/y/z/boofar.md", "x/y/z", "", "", "/z/y/q/", false, false, "/z/y/q/", "/z/y/q/"},
}
@ -46,12 +46,12 @@ func TestPermalink(t *testing.T) {
viper.Set("canonifyurls", test.canonifyURLs)
p := &Page{
Node: Node{
UrlPath: UrlPath{
URLPath: URLPath{
Section: "z",
Url: test.url,
URL: test.url,
},
Site: &SiteInfo{
BaseUrl: test.base,
BaseURL: test.base,
},
},
Source: Source{File: *source.NewFile(filepath.FromSlash(test.file))},