mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-23 17:20:24 +08:00
18 lines
283 B
Go
18 lines
283 B
Go
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
|
|
}
|
|
}
|