github.com/lingyao2333/mo-zero@v1.4.1/core/conf/options.go (about) 1 package conf 2 3 type ( 4 // Option defines the method to customize the config options. 5 Option func(opt *options) 6 7 options struct { 8 env bool 9 } 10 ) 11 12 // UseEnv customizes the config to use environment variables. 13 func UseEnv() Option { 14 return func(opt *options) { 15 opt.env = true 16 } 17 }