func catchListenAndServe(addr string, handler http.Handler, ident string, wg *sync.WaitGroup) { defer wg.Done() err := tablecloth.ListenAndServe(addr, handler, ident) if err != nil { log.Fatal(err) } }
func main() { cfg = NewConfig() SetupTablecloth() SetupLoggers(cfg) SetGoMaxProcs() extractor := NewExtractor(cfg) err := extractor.LoadEntities() if err != nil { log.Fatal(err) } extractorApi := NewExtractorAPI(extractor) logInfo("listening for requests on", cfg.extractAddress) err = tablecloth.ListenAndServe(cfg.extractAddress, extractorApi) if err != nil { log.Fatal(err) } }
func serve(addr string, handler http.Handler, wg *sync.WaitGroup, logger *logrus.Logger) { defer wg.Done() logger.Fatal(tablecloth.ListenAndServe(addr, handler)) }
func serve(addr string, m http.Handler, wg *sync.WaitGroup) { defer wg.Done() log.Fatal(tablecloth.ListenAndServe(addr, m)) }