Skip to content

drinkin/easytags

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easytags

Easy json/xml Tag generation tool for golang

Build Status

We generally write Field names in CamelCase and we generally want them to be in snake case when marshalled to json/xml/sql etc. We use tags for this purpose. But it is a repeatative process which should be automated.

usage :

easytags {file_name} {tag_name} example: easytags file.go json

You can also use this with go generate For example - In your source file, write following line

go:generate easytags filename.go json

And run

go generate

This will go through all the struct declarations in your source files, and add corresponding json/xml tags with field name changed to snake case. If you have already written a tag, this tool will not change that tag.

About

Easy json/xml Tag generation tool for golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 100.0%