+
Skip to content

Add public methods for UnderlineStyle and UnderlineColor #790

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

Merged
merged 2 commits into from
Jul 13, 2025

Conversation

noborus
Copy link
Contributor

@noborus noborus commented Mar 22, 2025

resolve #787

style.go Outdated
@@ -164,6 +164,16 @@ func (s Style) Underline(params ...interface{}) Style {
return s2
}

// UnderlineStyle returns the underline style for the style.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I understand the desire here, but these functions do not follow the pattern of other methods in the style. E.g. "Reverse()" returns a modified Style.

Perhaps prefixing their names with "Get" will avoid possible confusion here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're absolutely right! I'll update the method names to include the "Get" prefix to follow the existing pattern:

  • UnderlineStyle()GetUnderlineStyle()
  • UnderlineColor()GetUnderlineColor()

Thanks for the feedback!

Rename UnderlineStyle() and UnderlineColor() to GetUnderlineStyle()
and GetUnderlineColor() to align with existing Style API patterns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Methods to Retrieve UnderlineStyle and UnderlineColor in Style
2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载