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
$300 Free Credits for Your Google Cloud Projects Icon
$300 Free Credits for Your Google Cloud Projects

Start building on Google Cloud with $300 in free credits. No commitment, no credit card required until you're ready to scale.

Launch your next project with $300 in free Google Cloud credits—no strings attached. Test, build, and deploy without risk. Use your credits across the entire Google Cloud platform to find what works best for your needs. After your credits are used, continue with always-free tier services. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Start Free Trial
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