20 lines
305 B
Go
20 lines
305 B
Go
package routers
|
|
|
|
import (
|
|
"github.com/go-chi/chi/v5"
|
|
"net/http"
|
|
)
|
|
|
|
func ApiRouter() *chi.Mux {
|
|
apiRouter := chi.NewRouter()
|
|
|
|
apiRouter.Get("/silly-route", func(w http.ResponseWriter, r *http.Request) {
|
|
_, err := w.Write([]byte("you're gay"))
|
|
if err != nil {
|
|
return
|
|
}
|
|
})
|
|
|
|
return apiRouter
|
|
}
|