fix: honor global flag --debug
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
This commit is contained in:
@@ -34,13 +34,20 @@ var Server = http.Server{
|
||||
Handler: mux.New(),
|
||||
}
|
||||
|
||||
var DebugEndpoints bool
|
||||
|
||||
// Run finishes configuring Server and runs ListenAndServe on it
|
||||
func Run(bindAddr string, wg *sync.WaitGroup, certFile, keyFile, cliCaFile string, cliAuth bool) {
|
||||
func Run(bindAddr string, wg *sync.WaitGroup, certFile, keyFile, cliCaFile string, cliAuth, debug bool) {
|
||||
|
||||
Server = http.Server{
|
||||
Addr: bindAddr,
|
||||
Handler: mux.New(),
|
||||
}
|
||||
|
||||
if debug {
|
||||
Routes.SetDebug()
|
||||
}
|
||||
|
||||
listener, err := net.Listen("tcp", bindAddr)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user