ipld-eth-server/vendor/gopkg.in/DataDog/dd-trace-go.v1/contrib/database/sql/option.go

18 lines
473 B
Go
Raw Normal View History

2018-09-04 16:35:38 +00:00
package sql
type registerConfig struct{ serviceName string }
// RegisterOption represents an option that can be passed to Register.
type RegisterOption func(*registerConfig)
func defaults(cfg *registerConfig) {
// default cfg.serviceName set in Register based on driver name
}
// WithServiceName sets the given service name for the registered driver.
func WithServiceName(name string) RegisterOption {
return func(cfg *registerConfig) {
cfg.serviceName = name
}
}