options.go 158 B

123456789101112131415
  1. package conf
  2. type (
  3. Option func(opt *options)
  4. options struct {
  5. env bool
  6. }
  7. )
  8. func UseEnv() Option {
  9. return func(opt *options) {
  10. opt.env = true
  11. }
  12. }