These packages and functions under lib will one day be part of it's dedicated library/framework, so separating them here helps for the future.
19 lines
364 B
Go
19 lines
364 B
Go
package dev
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"forge.capytal.company/capytalcode/project-comicverse/lib/router"
|
|
)
|
|
|
|
func Routes() router.Router {
|
|
r := router.NewRouter()
|
|
r.Handle("/colors", &Colors{})
|
|
r.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusMethodNotAllowed)
|
|
_, _ = w.Write([]byte("hello world"))
|
|
})
|
|
|
|
return r
|
|
}
|