Go tool to modify/update field tags in structs. gomodifytags makes it easy to update, add or delete the tags in a struct field. You can easily add new tags, update existing tags (such as appending a new key, i.e: db, xml, etc..) or remove existing tags. It also allows you to add and remove tag options. It's intended to be used by an editor, but also has modes to run it from the terminal. Read the usage section below for more information. This accepts the struct name. i.e: -struct Server. The name should be a valid type name. The -struct flag selects the whole struct, and thus it will operate on all fields. There are many options on how you can change the struct. Let us start by adding tags. By default changes will be printed to stdout and can be used for dry-run your changes before making destructive changes. If you want to change it permanently, pass the -w (write) flag.

Features

  • You can disable printing the results to stdout with the --quiet flag
  • By default a struct tag's value is transformed from a struct's field and used directly
  • You can also pass a static value for each fields
  • To add options to for a given key, we use the -add-options flag
  • By default all fields are processed
  • You can remove multiple tags

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

BSD License

Follow gomodifytags

gomodifytags Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of gomodifytags!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Frameworks

Registered

2023-01-25