Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using Functional Options #24

Open
caglar10ur opened this issue Oct 11, 2014 · 4 comments
Open

Consider using Functional Options #24

caglar10ur opened this issue Oct 11, 2014 · 4 comments
Labels
Feature New feature, not a bug

Comments

@caglar10ur
Copy link
Member

See http://dotgo.sourcegraph.com/post/99643162983/dave-cheney-functional-options and https://github.com/pkg/term/blob/master/term.go#L22

@caglar10ur
Copy link
Member Author

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...

@brauner
Copy link
Member

brauner commented Apr 28, 2019

I don't mind so Ack from me. @stgaber, @hallyn?

@tomponline
Copy link
Contributor

@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 :)

@caglar10ur
Copy link
Member Author

@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.

@stgraber stgraber added Feature New feature, not a bug and removed enhancement labels Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature, not a bug
Development

No branches or pull requests

4 participants