refactor(router): rename pages to routes
This commit is contained in:
4
main.go
4
main.go
@@ -7,7 +7,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"extrovert/internals"
|
||||
"extrovert/pages"
|
||||
"extrovert/routes"
|
||||
)
|
||||
|
||||
var logger = log.Default()
|
||||
@@ -26,7 +26,7 @@ func main() {
|
||||
|
||||
mux := http.NewServeMux()
|
||||
|
||||
pages.RegisterAllRoutes(pages.ROUTES, mux)
|
||||
routes.RegisterAllRoutes(routes.ROUTES, mux)
|
||||
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.URL.Path != "/" {
|
||||
logger.Printf("Handling file server request. path=%s", r.URL.Path)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package pages
|
||||
package routes
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@@ -1,4 +1,4 @@
|
||||
package pages
|
||||
package routes
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@@ -1,4 +1,4 @@
|
||||
package pages
|
||||
package routes
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
Reference in New Issue
Block a user