fatih/gomodifytags

Support for lisp-case transforms

urandom opened this issue · 5 comments

Hi,

Would it be possible to add support for lisp-case, where the words are separated by hyphens?

fatih commented

Hi @urandom

Yeap it is. Can you give me an example struct with multiple fields and the expected struct with the struct tags in lisp mode ?

Hi,

Here's a real world example of mine:

type Config struct {
	Server      Server      `toml:"server"`
	DB          DB          `toml:"db"`
	Auth        Auth        `toml:"auth"`
	FeedParser  FeedParser  `toml:"feed-parser"`
	FeedManager FeedManager `toml:"feed-manager"`
	Content     Content     `toml:"content"`
}

I currently pretty much do a snake case insertion and then replace '_' with '-'

fatih commented

Great thanks. I'm going to tackle it this week. You'll be notified when this issue is closed.

Thanks

fatih commented

This is now merged to master. Thanks for the feedback.