Skip to content

struct: allow custom MapTo tag name - #400

Open
team-humaki wants to merge 1 commit into
go-ini:mainfrom
team-humaki:struct-custom-tag
Open

team-humaki wants to merge 1 commit into
go-ini:mainfrom
team-humaki:struct-custom-tag

Conversation

@team-humaki

Copy link
Copy Markdown

MapTo currently only reads the ini struct tag. Callers that already tag fields with json (or another name) have to duplicate tags.

Add WithMapToOptionTag for a per-call override and LoadOptions.TagName for load-time default. Empty still means ini.

Fixes #376

MapTo currently only reads the ini struct tag. Callers that already tag
fields with json (or another name) have to duplicate tags.

Add WithMapToOptionTag for a per-call override and LoadOptions.TagName
for load-time default. Empty still means ini.

Fixes go-ini#376

This branch has not been deployed

No deployments
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.

Need custom struct tag name

1 participant