use env if necessary in loading config (#409)

This commit is contained in:
Kevin Wan
2021-01-21 19:33:34 +08:00
committed by GitHub
parent 572b32729f
commit ebec5aafab
6 changed files with 120 additions and 10 deletions

15
core/conf/options.go Normal file
View 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
}
}