File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ type Config struct {
7777
7878// Functional Options Pattern
7979// https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis
80- type option func (* Config ) error
80+ type Option func (* Config ) error
8181
8282// NewConfig creates a new Config and sets default values.
8383func NewConfig () * Config {
@@ -92,7 +92,7 @@ func NewConfig() *Config {
9292 return cfg
9393}
9494
95- func (c * Config ) SetOptions (opts ... option ) error {
95+ func (c * Config ) Apply (opts ... Option ) error {
9696 for _ , opt := range opts {
9797 err := opt (c )
9898 if err != nil {
@@ -104,7 +104,7 @@ func (c *Config) SetOptions(opts ...option) error {
104104
105105// TimeTruncate sets the time duration to truncate time.Time values in
106106// query parameters.
107- func TimeTruncate (d time.Duration ) option {
107+ func TimeTruncate (d time.Duration ) Option {
108108 return func (cfg * Config ) error {
109109 cfg .timeTruncate = d
110110 return nil
You can’t perform that action at this time.
0 commit comments