gomodifytags

Go tool to modify struct field tags

BSD-3-CLAUSE License

Downloads
14
Stars
2.2K
Committers
19
gomodifytags - v1.17.0 Latest Release

Published by fatih 3 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/fatih/gomodifytags/compare/v1.16.0...v1.17.0

gomodifytags - v1.16.0

Published by fatih about 3 years ago

This release introduces a new titlecase transformation option. By passing the --transform titlecase flag, gomodifytags will transform the tags in the form of:

"BaseDomain"` -> `"Base Domain"

See related issue https://github.com/fatih/gomodifytags/issues/65 and the PR introducing this change: https://github.com/fatih/gomodifytags/pull/87

gomodifytags - v1.15.0

Published by fatih about 3 years ago

This release adds the new --quiet flag. When passed, gomodifytags won't output the results to stdout. This flag might be helpful for users who use gomodifytags for scripting in conjunction with the -w flag.

Changes: https://github.com/fatih/gomodifytags/pull/86

gomodifytags - v1.14.0

Published by fatih about 3 years ago

This release changes the special keyword to format tag values from $field to {field}. It fixes the issue described in:

https://github.com/fatih/gomodifytags/issues/76

Changes included in this release are: https://github.com/fatih/gomodifytags/pull/85

gomodifytags - v1.13.0

Published by fatih almost 4 years ago

This release includes the changes from the PR: https://github.com/fatih/gomodifytags/pull/64 gomodifytags handles now the following cases:

  • anonymous structs as function parameters
func test(arg struct {
 	Field int `json:"field"`
 }) {
 }
  • "pointer to struct" type declaration
var x *struct {
 	Field int `json:"field"`
 }
  • "array of struct" type declaration
var x []struct {
 	Field int
 }

and nested variants : "array of pointers to array of structs".

gomodifytags - v1.12.0

Published by fatih about 4 years ago

This release uses flag.CommandLine.Parse() instead of flag.Parse() to check for errors during flag parsing. This let us catch re-defined flag names.

Related changes: https://github.com/fatih/gomodifytags/pull/75

gomodifytags - v1.11.0

Published by fatih about 4 years ago

The flag --format was already in use. v1.10.0 introduced a new feature that also provided the --format flag. This releases changes the flag to --template.

PR: https://github.com/fatih/gomodifytags/pull/74

gomodifytags - v1.10.0

Published by fatih about 4 years ago

This release includes a new --format flag to change a struct tag's values based on the field name. This allows us to generate custom struct tags that don't follow the standard definition listed in https://golang.org/pkg/reflect/#StructTag. For a concrete example checkout the readme: https://github.com/fatih/gomodifytags#formatting-tag-values

Includes the changes from PR: https://github.com/fatih/gomodifytags/pull/69

gomodifytags - v1.9.0

Published by fatih about 4 years ago

Removes the vendor/ folder.

Changes: https://github.com/fatih/gomodifytags/pull/71

gomodifytags - v1.8.0

Published by fatih about 4 years ago

Bump github.com/fatih/structtag from v1.0.0 to v1.2.0

Related change: https://github.com/fatih/gomodifytags/pull/70

gomodifytags - v1.7.0

Published by fatih about 4 years ago

This release includes the new -field flag to modify a single field. It only works in conjunction with the -struct field and is a way to use gomodifytags from the terminal. Editors modify tags based on offset and are capable of editing single fields, hence they don't need this flag.

PR: https://github.com/fatih/gomodifytags/pull/68

gomodifytags - v1.6.0

Published by fatih over 4 years ago

This releases fixes the case where gomodifytags would skip embedded unexported fields, even if -skip-unexported was enabled. Changes: https://github.com/fatih/gomodifytags/pull/62

gomodifytags - v1.5.0

Published by fatih over 4 years ago

Includes the new -all selection flag which can be used to select all structs in a given file. Changes: https://github.com/fatih/gomodifytags/pull/61

gomodifytags - v1.4.0

Published by fatih over 4 years ago

Allow equals in tag values, i.e: validate:max=32

Code changes: https://github.com/fatih/gomodifytags/pull/57

gomodifytags - v1.3.0

Published by fatih over 4 years ago

Includes the fix for parsing static values: https://github.com/fatih/gomodifytags/pull/56

gomodifytags - v1.2.0

Published by fatih almost 5 years ago

Includes the following change:

gomodifytags - v1.1.0

Published by fatih almost 5 years ago

A new --skip-private option has been added to skip private fields. By default it's disabled. https://github.com/fatih/gomodifytags/pull/53

gomodifytags - v1.0.1

Published by fatih about 5 years ago

Changes:

gomodifytags - v1.0.0

Published by fatih about 5 years ago

gomodifytags is now in a good shape with a good feature set. Let's start tagging the release, which also sets the ground for future releases.