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

Fix linter warnings #10

Merged
merged 1 commit into from
Aug 22, 2024
Merged

Fix linter warnings #10

merged 1 commit into from
Aug 22, 2024

Conversation

code-a-man
Copy link
Contributor

Fixes issue

Fixes #8

Changes proposed

  • added required simple fields to the functions that give exhaustruct lint warning.

Check List (Check all the applicable boxes)

  • The title of my pull request is a short description of the requested
    changes.
  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • This PR does not contain plagiarized content.
  • My submissions follows the Submission Rules
  • I have read and accepted the Terms and Conditions

Screenshots

Note to reviewers

There are a lot of things to change, for now I'm categorizing them based on warnings and fix them step by step. I simply proceed from what I can figure out. For now, I left exhaustruct warnings that need to be examined in detail. I opened this PR so it can be tracked.

@code-a-man code-a-man marked this pull request as ready for review August 22, 2024 12:24
@code-a-man code-a-man requested a review from eser as a code owner August 22, 2024 12:24
chore: add required fields to related functions for exhaustruct lint warning

chore: remove nolint:varnamelen  comments

because rule disabled in config already

feat(logfx): improve replacerGenerator function

- add key-value attributes in prettyMode
- change switch statement to if at error handling

feat(logfx): improve error handling in Handler

- Add error wrapping to Handle method
- Update WithAttrs and WithGroup methods to retain writer and config fields

revert "chore: Add Out field to related functions for exhaustruct lint warning"

This reverts commit 1ef434f.

Revert "chore: add required fields to related functions for exhaustruct lint warning"

This reverts commit 1ad0dfc.

refactor(logfx): improve replacerGenerator function

- Change key-value attributes in prettyMode to empty
@eser eser merged commit 269d84d into eser:main Aug 22, 2024
1 check passed
@eser eser deleted the linter-warnings branch August 22, 2024 14:37
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.

Styling: Idiomatic Go Improvements and Linter Error Fixes
2 participants