go-lxc
go-lxc copied to clipboard
Consider using Functional Options
See http://dotgo.sourcegraph.com/post/99643162983/dave-cheney-functional-options and https://github.com/pkg/term/blob/master/term.go#L22
I still a have strong urge to do this and break the API even after this many year :) Functional options are (eg; go-grpc style) is really my favorite way.
Maybe we can do that and bump the bindings to v3...
I don't mind so Ack from me. @stgaber, @hallyn?
@caglar10ur the link above is broken now, but I think you're referring to this article https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis
Sounds good :)
@tomponline that is correct. go-grpc also uses that technique and the more I use it over the years the more I started to appreciate it. I don't know how would look like or fit into go-lxc but I'll give it a go in a branch and ping you to see what do you think about it before going ahead and changing everything.