--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
returnType := submatches[1] // before
funcName := submatches[4]
argList := submatches[5]
returnType := submatches[1] // after
funcName := submatches[4]
argList := submatches[5]
I just remembered about command line options. A great solution that would satisfy everyone's needs is to make it optional and turned off without a specific flag.
I believe it wouldn't make any practices worse because gofmt is still an optional tool, package maintainers create and share code considering it's usage or not.Conversely, lack of ability to locally tell it to make exception exactly encourages people to avoid use of gofmt, because process of formatting your files semi-manually by comparing diffs takes unnecessary efforts. I want just hit Ctrl-S and done. So such feature would be really worth it.
Of course I could just fix it myself by hand and leave it. But there are people running into this commonly. I am bothering because I want Go to have polished tools and provide smooth workflow. Formatting doesn't matter to end user, but matters for maintainability. Here is another example, consider I want to embed in code a chunk of binary data: http://play.golang.org/p/HQ5edXhdtS
On Friday, 21 August 2015 20:11:46 UTC+3, Иван Перевезенцев wrote:Of course I could just fix it myself by hand and leave it. But there are people running into this commonly. I am bothering because I want Go to have polished tools and provide smooth workflow. Formatting doesn't matter to end user, but matters for maintainability. Here is another example, consider I want to embed in code a chunk of binary data: http://play.golang.org/p/HQ5edXhdtS
In that matrix case, if you are writing those bytes and comments manually there's also a possibility of using a custom function: http://play.golang.org/p/E27cOxqeh9. (you had several bugs in your comments, hence using additional validation)
I just remembered about command line options. A great solution that would satisfy everyone's needs is to make it optional and turned off without a specific flag.