xframe/base/conf/options.go

18 lines
283 B
Go
Raw Normal View History

2024-10-12 12:55:20 +08:00
package conf
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
}
}