mirror of
https://github.com/NotAShelf/goblin.git
synced 2024-11-22 21:31:07 +00:00
18 lines
282 B
Go
18 lines
282 B
Go
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
|
|
}
|