Skip to content

Conversation

@chavacava
Copy link
Collaborator

keyJSON = "json"
keyProtobuf = "protobuf"
keyRequired = "required"
keyURL = "url"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd maybe update the docs to include all supported struct tags explicitly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this PR is one in a series of PR related to struct-tag, I'll will update the doc at the end.

var delimiter = ""
for _, opt := range options {
switch opt {
case "int", "omitempty", "numbered", "brackets":
Copy link
Collaborator

@denisvmedia denisvmedia Feb 16, 2025

Choose a reason for hiding this comment

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

It looks like we miss the following: unix, unixmilli, unixnano

Also, I'd consider adding support for layout and del struct tags, since they are a part of the spec for github.com/google/go-querystring/query.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I' ve added unix* options.

layout and del : almost no-body uses them so I think it does not worth supporting these tags.

@denisvmedia
Copy link
Collaborator

Thanks. Looks nice and simple. Just a few comments.

@chavacava chavacava merged commit 3cf67c5 into master Feb 17, 2025
7 checks passed
@chavacava chavacava deleted the feature/support-url-struct-tags branch February 17, 2025 06:18
mfederowicz pushed a commit to mfederowicz/revive that referenced this pull request Apr 18, 2025
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.

3 participants