Skip to content

[Go] Extend struct tag key matching - #4549

Merged
deathaxe merged 1 commit into
sublimehq:masterfrom
ilkiri23:go-struct-tag
May 18, 2026
Merged

[Go] Extend struct tag key matching#4549
deathaxe merged 1 commit into
sublimehq:masterfrom
ilkiri23:go-struct-tag

Conversation

@ilkiri23

Copy link
Copy Markdown
Contributor

Some Go packages use hyphens in struct tag keys. For example, cleanenv uses `env-default`:

type ConfigDatabase struct {
  Port string `yaml:"port" env:"PORT" env-default:"5432"`
  ...
}

@michaelblyons michaelblyons left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me. Thanks for making a PR and for linking the example.

@deathaxe
deathaxe merged commit 357e84b into sublimehq:master May 18, 2026
2 checks passed
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