mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-10 16:30:01 +08:00
use env if necessary in loading config (#409)
This commit is contained in:
15
core/conf/options.go
Normal file
15
core/conf/options.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package conf
|
||||
|
||||
type (
|
||||
Option func(opt *options)
|
||||
|
||||
options struct {
|
||||
env bool
|
||||
}
|
||||
)
|
||||
|
||||
func UseEnv() Option {
|
||||
return func(opt *options) {
|
||||
opt.env = true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user