Hi *Typically you can break your lines after comma ,, > after opening parenthesis e.g. (, [, {, and after a dot . which may be > referencing a field or method of some value. You can also break your line > after binary operators (those that require 2 operands), e.g.:*
Complete answer: https://stackoverflow.com/questions/34846848/how-to-break-a-long-line-of-code-in-golang#answer-34848928 And here a simple example with fmt.Println: https://play.golang.org/p/tP8zkOo79l Cheers snmed Am Donnerstag, 7. September 2017 10:24:19 UTC+2 schrieb Sankar: > > Even with most modern laptops, I found having 80 column limit is very > useful, when we split panes and read code. May be it is just my personal > preference :) > > 2017-09-07 12:05 GMT+05:30 Jakob Borg <ja...@kastelo.net <javascript:>>: > >> On 7 Sep 2017, at 06:10, Sankar <sankar.c...@gmail.com <javascript:>> >> wrote: >> > >> > Are there any tools available for golang to split long functions so >> that they can fit in 80 columns (as long as possible) ? >> >> Don't fear longer lines, most of us are not on text mode terminals any >> more. :) >> >> When it becomes *too* long it's probably hard to read due to being a too >> large or too complex expression, not the line length per se. My preferred >> solution would be to split it up with a variable or two. I don't think >> there is a tool for that, it requires human consideration. >> >> //jb >> >> > > > -- > Sankar P > http://psankar.blogspot.com > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.