Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

proposal: use functional options #174

Open
gbbr opened this issue Feb 7, 2018 · 1 comment
Open

proposal: use functional options #174

gbbr opened this issue Feb 7, 2018 · 1 comment

Comments

@gbbr
Copy link

gbbr commented Feb 7, 2018

The current implementation has an interface StartSpanOption where Dave Cheney's article is linked specifying that it is the inspiration for this functionality.

In the article, functional options are presented which are great and are used in many libraries. In functional options we have functions that return the same type, automatically grouping them nicely in documentation, such as for example in the grpc package.

In this library however, they are defined as an interface for no apparent reason. In this case, not only are they harder to implement and provide no real benefit, but also they do not group together in documentation, making doc pages clumsy and hard to follow.

I'd like to suggest to change this.

@yurishkuro
Copy link
Member

NB: StartSpanOptions should be a private type.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants