-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix trace log to show value instead of pointers #18926
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
Conversation
- Add a `String` method for the `RepoUnit`, such as you print it, it will show the repoUnit's type and not the whole struct(if passed as value). - Fixes a issue with a trace of repo.Units whereby it would show the pointers.
Might need to be backported, as this could be important for debugging when trace level is enabled. |
|
Why? Will golang call the String function if passed as function argument? |
From what I see, the templates which are using the Units still function correctly... So it should be good? |
Updated PR to instead fix-up the trace call(to avoid any issue when String() is being used accidental or not and doesn't give the full picture) |
When I've done this before I've always been caught out with templates which are expecting to test against numbers - we need to double check these. |
String
method for RepoUnit
* giteaofficial/main: Adjust error for already locked db and prevent level db lock on malformed connstr (go-gitea#18923) Avoid database lookups for `DescriptionHTML` (go-gitea#18924) Update go-org to v1.6.1 (go-gitea#18932) Fix trace log to show value instead of pointers (go-gitea#18926) Add announcement steps to release-howto (go-gitea#18896) Fix `<strong>` html in translation (go-gitea#18929)
- Fixes a issue with a trace of repo.Units whereby it would show the pointers. Before:  After: 
Before:

After:
