From 8dfadf408a174a8b59e03be69479c70820a7b93e Mon Sep 17 00:00:00 2001 From: Graham Esau Date: Fri, 22 Apr 2016 15:58:05 +0200 Subject: [PATCH] Use single API constructor Individual constructors for each API version were removed in GREsau/MailHog-Server@e7f979c845de6e9404a91875861a69cca2847f58 --- main.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 78291ee..df52832 100644 --- a/main.go +++ b/main.go @@ -76,14 +76,12 @@ func main() { if uiconf.UIBindAddr == apiconf.APIBindAddr { cb := func(r gohttp.Handler) { web.CreateWeb(uiconf, r.(*pat.Router), assets.Asset) - api.CreateAPIv1(apiconf, r.(*pat.Router)) - api.CreateAPIv2(apiconf, r.(*pat.Router)) + api.CreateAPI(apiconf, r.(*pat.Router)) } go http.Listen(uiconf.UIBindAddr, assets.Asset, exitCh, cb) } else { cb1 := func(r gohttp.Handler) { - api.CreateAPIv1(apiconf, r.(*pat.Router)) - api.CreateAPIv2(apiconf, r.(*pat.Router)) + api.CreateAPI(apiconf, r.(*pat.Router)) } cb2 := func(r gohttp.Handler) { web.CreateWeb(uiconf, r.(*pat.Router), assets.Asset)