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

navigation: Don't export either MenuEntry.IsEqual or MenuEntry.IsSameResource #11670

Closed
jmooring opened this issue Nov 4, 2023 · 2 comments · Fixed by #11683
Closed

navigation: Don't export either MenuEntry.IsEqual or MenuEntry.IsSameResource #11670

jmooring opened this issue Nov 4, 2023 · 2 comments · Fixed by #11683
Assignees
Milestone

Comments

@jmooring
Copy link
Member

jmooring commented Nov 4, 2023

I can't come up with a scenario where either of these is useful in a menu template.

@bep
Copy link
Member

bep commented Nov 5, 2023

Note that we have other cases of exported fields/methods that I have marked as internal in the Go doc (typically interface methods), which means that they should not be documented or used in templates -- and can be renamed/removed at any moment.

I haven't looked at these 2, but

  1. If they're not used outside of package, unexport.
  2. If it's simple to make it into a func (which it is in this case), do that.
  3. Else, add a "This method is for internal use only ..." comment as a comment.

jmooring added a commit to jmooring/hugo that referenced this issue Nov 8, 2023
- MenuEntry.IsEqual
- MenuEntry.IsSameResource

Closes gohugoio#11670
@jmooring jmooring self-assigned this Nov 9, 2023
bep pushed a commit that referenced this issue Nov 16, 2023
- MenuEntry.IsEqual
- MenuEntry.IsSameResource

Closes #11670
Copy link

github-actions bot commented Dec 8, 2023

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 Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants