This commit is contained in:
raf 2023-09-07 21:06:26 +03:00
commit c8e82d5d43
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
13 changed files with 921 additions and 0 deletions

15
internal/router/router.go Normal file
View file

@ -0,0 +1,15 @@
package router
import (
"net/http"
"github.com/gorilla/mux"
"goblin/internal/paste"
)
func NewRouter() http.Handler {
r := mux.NewRouter()
r.HandleFunc("/", paste.CreatePasteHandler).Methods("POST")
r.HandleFunc("/{id}", paste.GetPasteHandler).Methods("GET")
return r
}