From d6337281e381a723dbf641c5f8d582145aa1b340 Mon Sep 17 00:00:00 2001 From: Vladimir Stoilov Date: Wed, 12 Apr 2023 17:17:49 +0200 Subject: [PATCH] Fix enable server flag --- api/router.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/router.go b/api/router.go index 3cb4cc6..d9a93a5 100644 --- a/api/router.go +++ b/api/router.go @@ -19,7 +19,7 @@ import ( ) // EnableServer defines if the HTTP server should be started. -const EnableServer = true +var EnableServer = true var ( // mainMux is the main mux router. @@ -37,14 +37,14 @@ var ( } ) -// RegisterHandler registers a handler with the API endoint. +// RegisterHandler registers a handler with the API endpoint. func RegisterHandler(path string, handler http.Handler) *mux.Route { handlerLock.Lock() defer handlerLock.Unlock() return mainMux.Handle(path, handler) } -// RegisterHandleFunc registers a handle function with the API endoint. +// RegisterHandleFunc registers a handle function with the API endpoint. func RegisterHandleFunc(path string, handleFunc func(http.ResponseWriter, *http.Request)) *mux.Route { handlerLock.Lock() defer handlerLock.Unlock()