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

Refactor: Replace printf-style function with print-style for dynamic format #317

Merged
merged 4 commits into from
Oct 28, 2024

Conversation

MatthewAraujo
Copy link
Contributor

@MatthewAraujo MatthewAraujo commented Oct 17, 2024

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

Problem/Feature

This PR addresses the staticcheck issue (SA1006), which recommends using print-style functions when a printf-style function with no dynamic arguments is used.

Description of Changes:

  • Replaced log.Fatalf with log.Fatal for simpler logging.
  • Ensured proper error handling without unnecessary formatting.

Checklist

Copy link
Collaborator

@Ujstor Ujstor left a comment

Choose a reason for hiding this comment

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

This is a nice catch. We can remove the redundant syntax. I checked the other parts of the code, please include them in the PR, and we can merge it into the codebase:

docs/docs/endpoints-test/redis.md
docs/docs/endpoints-test/sql.md
docs/docs/endpoints-test/mongo.md

cmd/template/dbdriver/files/service/mysql.tmpl
cmd/template/dbdriver/files/service/postgres.tmpl
cmd/template/dbdriver/files/service/mongo.tmpl
cmd/template/dbdriver/files/service/redis.tmpl:73:53

@MatthewAraujo
Copy link
Contributor Author

This is a nice catch. We can remove the redundant syntax. I checked the other parts of the code, please include them in the PR, and we can merge it into the codebase:

docs/docs/endpoints-test/redis.md docs/docs/endpoints-test/sql.md docs/docs/endpoints-test/mongo.md

cmd/template/dbdriver/files/service/mysql.tmpl cmd/template/dbdriver/files/service/postgres.tmpl cmd/template/dbdriver/files/service/mongo.tmpl cmd/template/dbdriver/files/service/redis.tmpl:73:53

Already did that!
Thank you for saying

@Ujstor
Copy link
Collaborator

Ujstor commented Oct 17, 2024

You can also add yourself on contributors.yml list.

Copy link
Collaborator

@Ujstor Ujstor left a comment

Choose a reason for hiding this comment

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

LGTM

@Ujstor Ujstor merged commit ecb9f4a into Melkeydev:main Oct 28, 2024
166 checks passed
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.

4 participants