b1f8ac453b
feat!: base template * first bit of templating * codeowners * linuxbased * restart * baseline project * add grpc api and basic integration test * startqueue * queueMsg * splitscripts * migrations * queueintegrationtest * gateway
22 lines
289 B
Go
22 lines
289 B
Go
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
|
|
}
|
|
}
|