-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More initialism corrections (golint) #970
Conversation
See 6e30c10 To communicate these changes to the users, I think it is better to create temporary methods on the structs for the renamed fields and methods, like this:
|
@bep Thank you for authoring I need to leave the house in an hour though. I hope to find time tonight (12 hours from now?) to study and incorporate your example to deprecated struct fields. :-) |
No rush. Note that, from the template's point of view, a method will look (almost) like a field, so the above should work for both cases. |
2715302
to
92ae298
Compare
Hi @bep! You are brilliant! And so is your I have just pushed 92ae298; please check and see if it is OK. I will update the docs soon. :-) Thanks again! |
92ae298
to
aec7de8
Compare
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 gohugoio#959.
In particular: * .Url → .URL (for node, menu and paginator) * .Site.BaseUrl → .Site.BaseURL * getJson → getJSON * getCsv → getCSV * safeHtml → safeHTML * safeCss → safeCSS * safeUrl → safeURL Continued effort in fixing gohugoio#959.
aec7de8
to
41d3769
Compare
Merged. Quality work! I may be a person who thinks this is more important than the average developer Joe, but if you don't pull the tech debt by the horns, you get a legacy system pretty fast. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Deal with
Url -> URL
andBaseUrl -> BaseURL
conversionwhile preserving backward compatibility, and marking
relevant lines
deprecated
.Also fix related initialisms in strings and comments.
Continued effort in fixing #959.