func init() { flag.Parse() if *htstart { log.Printf("starting http://%s/\n", *htaddr) lab.Register("htmod", htmod.New(*htaddr)) } }
func init() { lab.LoadConf() if !(*useHttp || *useHttps) { return } conf := htmod.Config{ Https: *useHttps, Addr: *htaddr, } if conf.Https { conf.KeyFile = *keyFile conf.CertFile = *certFile conf.CAFile = *cacertFile log.Printf("starting https://%s/\n", conf.Addr) } else { log.Printf("starting http://%s/\n", conf.Addr) } lab.Register("htmod", htmod.New(conf)) }