You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.go 423B

12345678910111213141516171819
  1. package rex
  2. import (
  3. "flag"
  4. "runtime"
  5. )
  6. var (
  7. debug bool
  8. port int
  9. maxprocs int
  10. )
  11. func configure() {
  12. flag.BoolVar(&debug, "debug", Env.Bool("DEBUG", true), "flag to toggle debug mode")
  13. flag.IntVar(&port, "port", Env.Int("PORT", 5000), "port to run the application server")
  14. flag.IntVar(&maxprocs, "maxprocs", Env.Int("MAXPROCS", runtime.NumCPU()), "maximum cpu processes to run the server")
  15. flag.Parse()
  16. }