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