Skip to content
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

Add hasSuffix alias #10474

Closed
tyytytytyiigo opened this issue Nov 28, 2022 · 5 comments
Closed

Add hasSuffix alias #10474

tyytytytyiigo opened this issue Nov 28, 2022 · 5 comments

Comments

@tyytytytyiigo
Copy link

tyytytytyiigo commented Nov 28, 2022

strings.HasPrefix already has an alias of hasPrefix but strings.HasSuffix has no such alias. This is a request to add hasSuffix as an alias of the latter. (A project I am porting over to Hugo requires me to use lots of this string and the non-aliased one is a mouthful).

@bep bep removed the NeedsTriage label Nov 28, 2022
@bep bep added this to the v0.108.0 milestone Nov 28, 2022
@bep bep changed the title Add hasSuffix Add hasSuffix alias Nov 28, 2022
@bep bep modified the milestones: v0.108.0, v0.109.0 Dec 14, 2022
@bep bep added Enhancement and removed Proposal labels Jan 25, 2023
@bep
Copy link
Member

bep commented Jan 25, 2023

OK, this makes sense to get the symmetry in place.

@bep bep modified the milestones: v0.109.0, v0.111.0, v0.110.0 Jan 26, 2023
@bep bep modified the milestones: v0.111.0, v0.112.0 Feb 15, 2023
@jfish2
Copy link
Contributor

jfish2 commented Feb 23, 2023

Hi! I'm new to open source, but I'm a huge fan of Hugo and would love to tackle this issue. If this hasn't yet been worked on, I'll make sure to follow the contribution guide and try to get a PR in as soon as I'm able to.

@bep
Copy link
Member

bep commented Feb 24, 2023

@jfish2 You can see the pattern for how we alias these functions here: https://github.com/gohugoio/hugo/blob/master/tpl/strings/init.go#L98

jfish2 added a commit to jfish2/hugo that referenced this issue Mar 1, 2023
- strings.HasPrefix already has an alias of hasPrefix
but strings.HasSuffix has no such alias.
- This PR adds a hasSuffix alias to the tpl function with corresponding
function documentation.
- Adds a Minor update to the hasPrefix function documentation re:
keywords and relatedfuncs.

 Fixes gohugoio#10474
jfish2 added a commit to jfish2/hugo that referenced this issue Mar 1, 2023
  strings.HasPrefix already has an alias of hasPrefix
  but strings.HasSuffix has no such alias.This PR adds a hasSuffix alias
  to the tpl function with corresponding function documentation.
  It also adds a Minor update to the hasPrefix function documentation
  re: keywords and relatedfuncs.

  Fixes gohugoio#10474
jfish2 added a commit to jfish2/hugo that referenced this issue Mar 1, 2023
strings.HasPrefix already has an alias of hasPrefix
but strings.HasSuffix has no such alias.
This PR adds a hasSuffix alias to the tpl function with corresponding
function documentation.
It also adds a Minor update to the hasPrefix function documentation
re: keywords and relatedfuncs.

 Completes gohugoio#10474
bep pushed a commit that referenced this issue Mar 8, 2023
strings.HasPrefix already has an alias of hasPrefix
but strings.HasSuffix has no such alias.
This PR adds a hasSuffix alias to the tpl function with corresponding
function documentation.
It also adds a Minor update to the hasPrefix function documentation
re: keywords and relatedfuncs.

 Completes #10474
bep pushed a commit to gohugoio/hugoDocs that referenced this issue Mar 12, 2023
strings.HasPrefix already has an alias of hasPrefix
but strings.HasSuffix has no such alias.
This PR adds a hasSuffix alias to the tpl function with corresponding
function documentation.
It also adds a Minor update to the hasPrefix function documentation
re: keywords and relatedfuncs.

 Completes gohugoio/hugo#10474
@bep bep modified the milestones: v0.112.0, v0.113.0 Apr 15, 2023
@jmooring
Copy link
Member

Addressed with #10773

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants
@jmooring @bep @jfish2 @tyytytytyiigo and others