-
Notifications
You must be signed in to change notification settings - Fork 62
refactor: use coder/slog + minor go style changes #107
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2c20ae5
log -> coder/slog change
cstyan b1d22f2
minor style cleanup of readmefiles.go
cstyan 6b4093c
minor style changes in main.go
cstyan 097b8a2
minor style changes in errors.go
cstyan ed629c1
minor contributors.go style changes
cstyan 85743cd
minor style changes in corderresources.go
cstyan 6e8fc77
minor style changes in repostructure.go
cstyan 4fc0a54
address review feedback from Michael
cstyan 8ab9fe9
some more minor changes
cstyan 11e4da3
these regex should be equivalent, but using backticks we can avoid ha…
cstyan 333d962
make each phase type string explicitly an instance the validationPhas…
cstyan 94f0cb0
Merge branch 'main' into callum-registry-go-style
cstyan 9fd7eb4
give validation phases more obvious name prefixes
cstyan 673df61
back out some non-idiomatic one lining but add helper functions to ma…
cstyan 518d860
two final fixes
cstyan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
log -> coder/slog change
Signed-off-by: Callum Styan <[email protected]>
- Loading branch information
commit 2c20ae5f04e1e6ff096f04fc63c80630567c2cb1
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
I'm still new to structured logging. Is there any special behavior/benefit you get if you use the same key multiple times? I guess I'm just wondering how much of a concern it is to make sure you're using the same keys each time you describe the same "resource", particularly for a function call that takes a variadic slice of empty interfaces (so basically zero type-safety)
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.
It's not the end of the world if you don't use the same key, but it does make searching for logs in some kind of log aggregation system much easier.
For example, a system I used to work on referred to the same internal
tenant
type within the system as variations ofuser
,tenant
,id
, etc. Remembering which key was used on which logged lines complicated searches when I knew within I needed to see info fortenant="1234"
but on some lines the logging wasuser="1234"
.Again this is likely less important in the case of the registry but still a good practice.