From 7ae23bb2c6b6f881539ba42271f41a10d74b2c41 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Sun, 25 Oct 2015 16:31:56 -0400 Subject: [PATCH] inline interface definition to avoid confusion --- chihaya.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/chihaya.go b/chihaya.go index 72f7be4..1408aba 100644 --- a/chihaya.go +++ b/chihaya.go @@ -38,11 +38,6 @@ func init() { flag.StringVar(&configPath, "config", "", "path to the configuration file") } -type server interface { - Serve() - Stop() -} - // Boot starts Chihaya. By exporting this function, anyone can import their own // custom drivers into their own package main and then call chihaya.Boot. func Boot() { @@ -74,7 +69,10 @@ func Boot() { glog.Fatal("New: ", err) } - var servers []server + var servers []interface { + Serve() + Stop() + } if cfg.APIConfig.ListenAddr != "" { srv := api.NewServer(cfg, tkr)