mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
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:
@@ -135,7 +135,7 @@ func serve(port int) {
|
||||
}
|
||||
}
|
||||
|
||||
// fixUrl massages the BaseUrl into a form needed for serving
|
||||
// fixURL massages the BaseURL into a form needed for serving
|
||||
// all pages correctly.
|
||||
func fixURL(s string) (string, error) {
|
||||
useLocalhost := false
|
||||
@@ -164,7 +164,7 @@ func fixURL(s string) (string, error) {
|
||||
if strings.Contains(host, ":") {
|
||||
host, _, err = net.SplitHostPort(u.Host)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("Failed to split BaseUrl hostpost: %s", err)
|
||||
return "", fmt.Errorf("Failed to split BaseURL hostpost: %s", err)
|
||||
}
|
||||
}
|
||||
u.Host = fmt.Sprintf("%s:%d", host, serverPort)
|
||||
|
Reference in New Issue
Block a user