mirror of
https://github.com/datarhei/core.git
synced 2025-10-20 22:49:50 +08:00
Add v16.7.2
This commit is contained in:
21
vendor/github.com/lufia/plan9stats/opts.go
generated
vendored
Normal file
21
vendor/github.com/lufia/plan9stats/opts.go
generated
vendored
Normal file
@@ -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