griesemer / tryhard

tryhard finds and rewrites code suitable for try.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

offer the more common -w for write

philoserf opened this issue · comments

-r rewrite doesn't follow the common golang model of -w write found in core utilities like gofmt, goimports, or goreturns.

as a nod to common practice add it and deprecate -r for the next release

It's really a rewrite, not so much a formatted write, hence the -r. But fine. I'll change it in the next round of changes.

It is exactly what gofmt does with -w much like gofmt -s -w

Not attached to it. Just found the -r surprising

I found a few examples that use -r, replace. Who know what is right with names?