Initial QSfera import
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
package stats
|
||||
|
||||
type Config struct {
|
||||
rootdir string
|
||||
}
|
||||
|
||||
type Option func(*Config)
|
||||
|
||||
func newConfig(opts ...Option) *Config {
|
||||
var cfg Config
|
||||
for _, opt := range opts {
|
||||
opt(&cfg)
|
||||
}
|
||||
return &cfg
|
||||
}
|
||||
|
||||
func WithRootDir(dir string) Option {
|
||||
return func(cfg *Config) {
|
||||
cfg.rootdir = dir
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user