-
Notifications
You must be signed in to change notification settings - Fork 1
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: allow well-known headers #40
Conversation
e77068d
to
39690ed
Compare
"WWW-Authenticate", | ||
"X-WebKit-CSP", | ||
"X-Real-IP", | ||
} |
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 would have defined only the ones where result would be different than well known. But I would have put all of them in the tests for testing possible regression.
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 what you did in initialismer in fact, so I'm unsure why you have the well known list then 🤔
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 don't want to find manually non-canonical headers in the well-know list
@@ -0,0 +1,74 @@ | |||
// Code generated by initialismer; DO NOT EDIT. |
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 don't get the purpose of this file. It's for tests only no?
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.
Yes, only tests, the linter shouldn't print diagnostics.
In v2, I will add the golden file and invert this test:
h.Get("Caldav-Timezones") -> h.Get("CalDAV-Timezones")
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.
My bad, I totally missed it was a file in testdada
@@ -5,3 +5,8 @@ test: | |||
|
|||
linter: | |||
golangci-lint -v run ./... | |||
|
|||
generate: | |||
go run ./cmd/initialismer/*.go -target="mapping" > ./initialism.go |
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 unsure why you are not using go generate
with a `//go:generate in the code
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.
Thanks for replying to every single comment I did.
This one has no reply yet
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.
In my opinion:
- go generate -- generate non repo files
- make generate -- generate repo files
I didn't think much about it 🤔
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 thought about it because I recently faced it
|
||
genTarget, err := parseTarget() | ||
if err != nil { | ||
slog.Error("parse target:", slog.Any("error", err)) |
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.
No exit or return here?
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.
Oh, thanks, wil fix this
@lasiar I'm unsure if you saw my comments. I'm sorry for the ping/notification if you did |
See: #12