first commit

This commit is contained in:
2022-03-17 15:59:24 +08:00
commit 2b0debb847
592 changed files with 73946 additions and 0 deletions

23
pkg/config/options.go Normal file
View File

@@ -0,0 +1,23 @@
package config
type (
// Option defines the method to customize the config options.
Option func(opt *options)
options struct {
env bool
}
)
// UseEnv customizes the config to use environment variables.
func UseEnv() Option {
return func(opt *options) {
opt.env = true
}
}
func SetEnv(f bool) Option {
return func(opt *options) {
opt.env = f
}
}