Preferred wrapping for long function declarations

Frank Mueller frank.mueller at canonical.com
Wed May 14 07:30:08 UTC 2014


On Tue, May 13, 2014 at 11:38 PM, Tim Penhey <tim.penhey at canonical.com>wrote:

gofmt becomes the source of truth. As long as it is happy, I'm happy
> enough.
>

+1, should be too difficult to find a common agreement for all
possibilities and all developers. Thankfully go has a tool like gofmt, I
had enough discussions about topics like this during my Java time. :/

Only aspect I think about when having very long function declarations is if
there are alternatives (e.g. grouping of arguments which are used in this
combination more often into a struct; variadic option arguments; different
public funcs when some args are optional, common logic in private func
etc.). But if nothing of this makes sense I'm happy that gofmt helps me
that everything is fine aligned. :)

mue

-- 
** Frank Mueller <frank.mueller at canonical.com>
** Software Engineer - Juju Development
** Canonical
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20140514/a2e6adde/attachment.html>


More information about the Juju-dev mailing list