initial commit

This commit is contained in:
maotovisk 2025-08-06 16:04:04 -03:00
parent 9baa0fab25
commit fc46164556
14 changed files with 243 additions and 0 deletions

19
internal/app/routes.go Normal file
View file

@ -0,0 +1,19 @@
package app
import (
"maot-shortner/internal/handlers"
"net/http"
)
type HandlerList struct {
*handlers.LinkHandler
}
func CreateMux(handlers HandlerList) *http.ServeMux {
r := http.NewServeMux()
r.HandleFunc("/links", handlers.LinkHandler.ListLinks)
r.HandleFunc("/", handlers.LinkHandler.Handle)
return r
}