-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Being consistent in how we configure and create things in the project means users can easily anticipate what they need to do. Currently this is not the case.
We should standardize on the approach outlined in this comment:
type Option func(*Config)
type Config struct { ... }
func NewT(config Config) *T { ... }
func ConfigureT(opts ...Option) *T {
config := Config{}
for _, opt := range opts {
opt(&config)
}
t := NewT(config)
// ...
}
paivagustavo and jmacd
Metadata
Metadata
Assignees
Labels
pkg:APIRelated to an API packageRelated to an API package