diff --git a/Gopkg.lock b/Gopkg.lock index bf1bab7e..b97972ac 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -8,10 +8,10 @@ version = "v6" [[projects]] + branch = "master" name = "github.com/cheggaaa/pb" packages = ["."] - revision = "f6ccf2184de4dd34495277e38dc19b6e7fbe0ea2" - version = "v1.0.15" + revision = "0af82b7d15eb9371fbdf8f468ff10cbba62e0414" [[projects]] name = "github.com/dgrijalva/jwt-go" @@ -59,13 +59,13 @@ branch = "master" name = "github.com/kotakanbe/logrus-prefixed-formatter" packages = ["."] - revision = "5ea278a9a3f980f7cdf1dc787dc4a85ac72502d9" + revision = "75edb2e85a38873f0318be05a458446681d1022f" [[projects]] name = "github.com/labstack/echo" - packages = [".","context","engine","engine/standard","log","middleware"] - revision = "e08070379af60f5b9c0fb5bb2d1527ba9624fe43" - version = "v2.2.0" + packages = [".","middleware"] + revision = "935a60782cbbc55110e7bd4b33120e4567cbee43" + version = "v3.2.1" [[projects]] name = "github.com/labstack/gommon" @@ -157,6 +157,12 @@ packages = ["syncutil"] revision = "034d17a462f7b2dcd1a4a73553ec5357ff6e6c6e" +[[projects]] + branch = "master" + name = "golang.org/x/crypto" + packages = ["acme","acme/autocert","ssh/terminal"] + revision = "b176d7def5d71bdd214203491f89843ed217f420" + [[projects]] branch = "master" name = "golang.org/x/net" @@ -166,7 +172,7 @@ [[projects]] branch = "master" name = "golang.org/x/sys" - packages = ["unix"] + packages = ["unix","windows"] revision = "90796e5a05ce440b41c768bd9af257005e470461" [[projects]] @@ -178,6 +184,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "38bdc26a7e008d3202f717addef99b0a0a7adaedca19e9994c625533a14dff04" + inputs-digest = "107b8778e8e56469493bbde2903e5090608357e5ee3b1c2341fed7e008534280" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index a85438bf..0c7e1536 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -10,3 +10,7 @@ [[constraint]] name = "github.com/cheggaaa/pb" branch = "master" + +[[constraint]] + name = "cloud.google.com/go/storage" + branch = "master" diff --git a/server/server.go b/server/server.go index 2e944e1f..55bc419e 100644 --- a/server/server.go +++ b/server/server.go @@ -10,14 +10,13 @@ import ( "github.com/kotakanbe/go-cve-dictionary/db" log "github.com/kotakanbe/go-cve-dictionary/log" "github.com/labstack/echo" - "github.com/labstack/echo/engine/standard" "github.com/labstack/echo/middleware" ) // Start starts CVE dictionary HTTP Server. func Start(logDir string, driver db.DB) error { e := echo.New() - e.SetDebug(config.Conf.Debug) + e.Debug = config.Conf.Debug // Middleware e.Use(middleware.Logger()) @@ -40,14 +39,14 @@ func Start(logDir string, driver db.DB) error { })) // Routes - e.Get("/health", health()) - e.Get("/cves/:id", getCve(driver)) - e.Post("/cpes", getCveByCpeName(driver)) + e.GET("/health", health()) + e.GET("/cves/:id", getCve(driver)) + e.POST("/cpes", getCveByCpeName(driver)) bindURL := fmt.Sprintf("%s:%s", config.Conf.Bind, config.Conf.Port) log.Infof("Listening on %s", bindURL) - e.Run(standard.New(bindURL)) + e.Start(bindURL) return nil }