Skip to content

reflect: back out multiple keys in key:value pair in struct tag #40281

Closed
@scorsi

Description

@scorsi

Hello 👋

I'm actually boring to set the same value for multiple key in my struct tag. Maybe I missed something but here is the boring thing:

type MyStruct struct {
  Field1 string `json:"field_1,omitempty" bson:"field_1,omitempty" xml:"field_1,omitempty" form:"field_1,omitempty" other:"value"`
}

What I'm proposing is:

type MyStruct struct {
  Field1 string `json,bson,xml,form:"field_1,omitempty" other:"value"`
}

Thanks 👍

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions