package api import ( "net/http" "dacremont.xyz/learnrest/api/messages" ) type Api struct {} func NewApi () *http.ServeMux { mux := http.NewServeMux() mux.Handle("/messages", messages.NewMessagesAPI()) mux.HandleFunc("GET /hello", func(w http.ResponseWriter, r *http.Request) {w.Write([]byte("World!"))}) return mux }