-
Notifications
You must be signed in to change notification settings - Fork 10
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 Stringer support. Fix #29 #34
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
david-littlefarmer
approved these changes
Jun 26, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for PR with fix!
Looks ok for me, merging.
renovate bot
referenced
this pull request
in jippi/dottie
Aug 19, 2024
….mod (#80) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/golang-cz/devslog](https://togithub.com/golang-cz/devslog) | `v0.0.8` -> `v0.0.9` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolang-cz%2fdevslog/v0.0.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolang-cz%2fdevslog/v0.0.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolang-cz%2fdevslog/v0.0.8/v0.0.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolang-cz%2fdevslog/v0.0.8/v0.0.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>golang-cz/devslog (github.com/golang-cz/devslog)</summary> ### [`v0.0.9`](https://togithub.com/golang-cz/devslog/releases/tag/v0.0.9) [Compare Source](https://togithub.com/golang-cz/devslog/compare/v0.0.8...v0.0.9) #### What's Changed - Fixed slog.Any does not handle interfaces by [@​noppawitt](https://togithub.com/noppawitt) in [https://github.com/golang-cz/devslog/pull/27](https://togithub.com/golang-cz/devslog/pull/27) - string indent with new lines by [@​david-littlefarmer](https://togithub.com/david-littlefarmer) in [https://github.com/golang-cz/devslog/pull/24](https://togithub.com/golang-cz/devslog/pull/24) - ignore unexported fields in struct to avoid panic by [@​violin0622](https://togithub.com/violin0622) in [https://github.com/golang-cz/devslog/pull/31](https://togithub.com/golang-cz/devslog/pull/31) - color tests by [@​david-littlefarmer](https://togithub.com/david-littlefarmer) in [https://github.com/golang-cz/devslog/pull/33](https://togithub.com/golang-cz/devslog/pull/33) - Stringer by [@​david-littlefarmer](https://togithub.com/david-littlefarmer) in [https://github.com/golang-cz/devslog/pull/32](https://togithub.com/golang-cz/devslog/pull/32) - Add Stringer support. Fix [#​29](https://togithub.com/golang-cz/devslog/issues/29) by [@​ghostiam](https://togithub.com/ghostiam) in [https://github.com/golang-cz/devslog/pull/34](https://togithub.com/golang-cz/devslog/pull/34) - Removed equal signs from groups by [@​david-littlefarmer](https://togithub.com/david-littlefarmer) in [https://github.com/golang-cz/devslog/pull/36](https://togithub.com/golang-cz/devslog/pull/36) #### New Contributors - [@​noppawitt](https://togithub.com/noppawitt) made their first contribution in [https://github.com/golang-cz/devslog/pull/27](https://togithub.com/golang-cz/devslog/pull/27) - [@​violin0622](https://togithub.com/violin0622) made their first contribution in [https://github.com/golang-cz/devslog/pull/31](https://togithub.com/golang-cz/devslog/pull/31) - [@​ghostiam](https://togithub.com/ghostiam) made their first contribution in [https://github.com/golang-cz/devslog/pull/34](https://togithub.com/golang-cz/devslog/pull/34) **Full Changelog**: golang-cz/devslog@v0.0.8...v0.0.9 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "* */1 * * *" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/jippi/dottie). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Unfortunately, PR #32 does not work as expected. For types that have a
String()
method, output is raw instead of using the method.Example:
In this PR, formatting uses the
String()
method if it exists (for any type).Also, for each field in the structure, the existence of this method is also checked, that is, if the parent structure does not have a
String()
method, but the fields do, then we will see normally formatted fields.Since this behavior may not always be desirable, formatting is only enabled if the
StringerFormatter
option is true.Fix #29
Checklist