summaryrefslogtreecommitdiffstats
path: root/helpers/url.go
diff options
context:
space:
mode:
authorAnthony Fok <foka@debian.org>2015-03-17 22:16:54 -0700
committerbep <bjorn.erik.pedersen@gmail.com>2015-03-18 11:30:37 +0100
commit8b8fb417ae065954a056ea018bd092748cc9127c (patch)
treea9160d1f6acc218bcb8728d729deaf1b532b56b3 /helpers/url.go
parentca69cad8aa5d8eefbce13abd97b2b979339a458c (diff)
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.
Diffstat (limited to 'helpers/url.go')
-rw-r--r--helpers/url.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/helpers/url.go b/helpers/url.go
index b9b58d050..13421632f 100644
--- a/helpers/url.go
+++ b/helpers/url.go
@@ -69,7 +69,7 @@ func sanitizeURLWithFlags(in string, f purell.NormalizationFlags) string {
// in issues #157, #622, etc., without forcing
// relative URLs to begin with '/'.
// Once the fixes are in, let's remove this kludge
- // and restore SanitizeUrl() to the way it was.
+ // and restore SanitizeURL() to the way it was.
// -- @anthonyfok, 2015-02-16
//
// Begin temporary kludge
@@ -87,12 +87,12 @@ func sanitizeURLWithFlags(in string, f purell.NormalizationFlags) string {
}
-// SanitizeUrl sanitizes the input URL string.
+// SanitizeURL sanitizes the input URL string.
func SanitizeURL(in string) string {
return sanitizeURLWithFlags(in, purell.FlagsSafe|purell.FlagRemoveTrailingSlash|purell.FlagRemoveDotSegments|purell.FlagRemoveDuplicateSlashes|purell.FlagRemoveUnnecessaryHostDots|purell.FlagRemoveEmptyPortSeparator)
}
-// SanitizeUrlKeepTrailingSlash is the same as SanitizeUrl, but will keep any trailing slash.
+// SanitizeURLKeepTrailingSlash is the same as SanitizeURL, but will keep any trailing slash.
func SanitizeURLKeepTrailingSlash(in string) string {
return sanitizeURLWithFlags(in, purell.FlagsSafe|purell.FlagRemoveDotSegments|purell.FlagRemoveDuplicateSlashes|purell.FlagRemoveUnnecessaryHostDots|purell.FlagRemoveEmptyPortSeparator)
}
@@ -147,7 +147,7 @@ func MakePermalink(host, plink string) *url.URL {
// AddContextRoot adds the context root to an URL if it's not already set.
// For relative URL entries on sites with a base url with a context root set (i.e. http://example.com/mysite),
-// relative URLs must not include the context root if canonifyUrls is enabled. But if it's disabled, it must be set.
+// relative URLs must not include the context root if canonifyURLs is enabled. But if it's disabled, it must be set.
func AddContextRoot(baseURL, relativePath string) string {
url, err := url.Parse(baseURL)
@@ -185,7 +185,7 @@ func URLPrep(ugly bool, in string) string {
return url
}
-// PrettifyUrl takes a URL string and returns a semantic, clean URL.
+// PrettifyURL takes a URL string and returns a semantic, clean URL.
func PrettifyURL(in string) string {
x := PrettifyURLPath(in)
@@ -200,7 +200,7 @@ func PrettifyURL(in string) string {
return x
}
-// PrettifyUrlPath takes a URL path to a content and converts it
+// PrettifyURLPath takes a URL path to a content and converts it
// to enable pretty URLs.
// /section/name.html becomes /section/name/index.html
// /section/name/ becomes /section/name/index.html
@@ -209,7 +209,7 @@ func PrettifyURLPath(in string) string {
return PrettiyPath(in, pathBridge)
}
-// Uglify does the opposite of PrettifyUrlPath().
+// Uglify does the opposite of PrettifyURLPath().
// /section/name/index.html becomes /section/name.html
// /section/name/ becomes /section/name.html
// /section/name.html becomes /section/name.html