Revert mistakes
parent
a875b40362
commit
5b8692a930
6
go.mod
6
go.mod
|
@ -1,6 +1,6 @@
|
|||
module "github.com/serverwentdown/short"
|
||||
module github.com/serverwentdown/short
|
||||
|
||||
require (
|
||||
"github.com/julienschmidt/httprouter" v0.0.0-20150626000000-d18983907793
|
||||
"github.com/lib/pq" v0.0.0-20180201184707-d34b9ff171c2
|
||||
github.com/julienschmidt/httprouter v0.0.0-20150626000000-d18983907793
|
||||
github.com/lib/pq v0.0.0-20180201184707-d34b9ff171c2
|
||||
)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
github.com/julienschmidt/httprouter v0.0.0-20150626000000-d18983907793 h1:od+0FIrhmVJFv+bwjkVPTrBcc8ilKfvI8wwba4joboI=
|
||||
github.com/julienschmidt/httprouter v0.0.0-20150626000000-d18983907793/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/lib/pq v0.0.0-20180201184707-d34b9ff171c2 h1:YWMQvnYCw3tNx1QOWBaz8P6A/0K7rfRhZXgUhJigmaE=
|
||||
github.com/lib/pq v0.0.0-20180201184707-d34b9ff171c2/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
|
@ -1,16 +1,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/julienschmidt/httprouter"
|
||||
)
|
||||
|
||||
func NewRouter(h *Handlers) *httprouter.Router {
|
||||
router := httprouter.New()
|
||||
router.GET("/healthz", func(w http.ResponseWriter, _ *http.Request, _ httprouter.Params) {
|
||||
healthz(w)
|
||||
})
|
||||
router.POST("/new", h.Create)
|
||||
router.GET("/", h.Index)
|
||||
router.GET("/:id", h.Get)
|
||||
|
|
Loading…
Reference in New Issue