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

feat: add logger middleware for dev/local environment #38

Conversation

martinyonatann
Copy link
Contributor

Closes #37

Copy link

codecov bot commented Dec 27, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (9305062) 61.96% compared to head (2f88bb1) 67.59%.
Report is 2 commits behind head on main.

❗ Current head 2f88bb1 differs from pull request most recent head 4e11f7f. Consider uploading reports for the commit 4e11f7f to get more accurate results

Files Patch % Lines
src/server/server.go 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
+ Coverage   61.96%   67.59%   +5.62%     
==========================================
  Files          23       23              
  Lines         539      503      -36     
==========================================
+ Hits          334      340       +6     
+ Misses        177      137      -40     
+ Partials       28       26       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@championswimmer
Copy link
Owner

@martinyonatann
can you take a pull and redo go get so the go.sum is sorted out again?

@martinyonatann martinyonatann force-pushed the feat/middleware-logger branch from 664f3c6 to adca0a8 Compare January 4, 2024 15:10
@martinyonatann martinyonatann force-pushed the feat/middleware-logger branch from adca0a8 to 2f88bb1 Compare January 4, 2024 15:11
)

const (
ENVIRONMENT_NAME_PRODUCTION = "production"
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 in Go the culture is not to use ALL_CAP_CASE for variables like Java world no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Constant should use all capital letters and use underscore _ to separate words. Eg. INT_MAX

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

https://go.dev/talks/2014/names.slide#5
Please try to follow the official blog and its rules

Constant should use all capital letters and use underscore _ to separate words. Eg. INT_MAX

Can't have capital always as in Go, capital suggests exporting of values outside package scope

Copy link
Owner

@championswimmer championswimmer left a comment

Choose a reason for hiding this comment

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

looks good other than the const naming in CAP_CASE

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.

feat: add logger middleware for dev/local environment
3 participants