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

struct-tag: support "properties" tag #1269

Open
ccoVeille opened this issue Mar 12, 2025 · 0 comments
Open

struct-tag: support "properties" tag #1269

ccoVeille opened this issue Mar 12, 2025 · 0 comments

Comments

@ccoVeille
Copy link
Contributor

ccoVeille commented Mar 12, 2025

"properties" was added to the well-known struct tags on Go wiki

It could be added to revive to the very sane way TOML support was added recently to struct-tag rule

Here is the documentation of the format of this tag

https://pkg.go.dev/github.com/magiconair/properties#Properties.Decode

Based on my understanding of the code and documentation only the following options are supported

  • "-" ignored
  • "default" (without it a field is required)
    Note: There is a special notation using ; for slice/array default value.
  • "layout" (only for time.Time type)

cc @magiconair (properties lib owner)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants