Skip to content

tag value is removed and set to empty #19

@mtekeli

Description

@mtekeli

Run

go run github.com/4meepo/tagalign/cmd/tagalign@latest -fix -sort -strict -order "protobuf,json,flag,long,short,env,yaml,db,cql,group,namespace,env-namespace,path,query,header,required,mapstructure,binding,command,validate,enum,minItems,minimum,maximum,description,doc,example,default-max,default" ./...

in file with this example struct:

type Foo struct {
	Foo []string `json:"foo,omitempty" long:"foo" env:"FOO" env-delim:"," description:"List of foos."`
}

which then becomes:

type Foo struct {
	Foo []string `json:"foo,omitempty" long:"foo" env:"FOO" description:"List of foos." env-delim:""`
}

Notice how the value of env-delim (',') is removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions