diff --git a/Makefile b/Makefile index 38fdeac..1e92b18 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ .PHONY: build build: - go build backend/bin/shelves.go + go build bin/shelves.go run: - go run backend/bin/shelves.go + go run bin/shelves.go watch: fd | entr -cr make run diff --git a/backend/auth/auth.go b/auth/auth.go similarity index 100% rename from backend/auth/auth.go rename to auth/auth.go diff --git a/backend/bin/shelves.go b/bin/shelves.go similarity index 92% rename from backend/bin/shelves.go rename to bin/shelves.go index e021bbe..3ec7a14 100644 --- a/backend/bin/shelves.go +++ b/bin/shelves.go @@ -7,9 +7,9 @@ import ( _ "github.com/mattn/go-sqlite3" - "shelves/backend/db" - "shelves/backend/httpx" - "shelves/backend/routes" + "shelves/db" + "shelves/httpx" + "shelves/routes" ) func main() { diff --git a/backend/db/db.go b/db/db.go similarity index 100% rename from backend/db/db.go rename to db/db.go diff --git a/backend/errorsx/errorsx.go b/errorsx/errorsx.go similarity index 100% rename from backend/errorsx/errorsx.go rename to errorsx/errorsx.go diff --git a/backend/forms/forms.go b/forms/forms.go similarity index 100% rename from backend/forms/forms.go rename to forms/forms.go diff --git a/backend/httpx/httpx.go b/httpx/httpx.go similarity index 94% rename from backend/httpx/httpx.go rename to httpx/httpx.go index 6a250a7..e275cd2 100644 --- a/backend/httpx/httpx.go +++ b/httpx/httpx.go @@ -4,8 +4,8 @@ import ( "log" "net/http" "net/url" - "shelves/backend/errorsx" - "shelves/backend/urls" + "shelves/errorsx" + "shelves/urls" ) func SeeOther(w http.ResponseWriter, location string) { diff --git a/backend/httpx/hx.go b/httpx/hx.go similarity index 100% rename from backend/httpx/hx.go rename to httpx/hx.go diff --git a/backend/httpx/middleware.go b/httpx/middleware.go similarity index 98% rename from backend/httpx/middleware.go rename to httpx/middleware.go index abc151e..1fe7b63 100644 --- a/backend/httpx/middleware.go +++ b/httpx/middleware.go @@ -5,7 +5,7 @@ import ( "database/sql" "log" "net/http" - "shelves/backend/auth" + "shelves/auth" "time" ) diff --git a/backend/routes/home.go b/routes/home.go similarity index 85% rename from backend/routes/home.go rename to routes/home.go index 3d05a92..5cd01ac 100644 --- a/backend/routes/home.go +++ b/routes/home.go @@ -2,8 +2,8 @@ package routes import ( "net/http" - "shelves/backend/httpx" - "shelves/backend/templates" + "shelves/httpx" + "shelves/templates" ) type homeTemplate struct { diff --git a/backend/routes/login.go b/routes/login.go similarity index 95% rename from backend/routes/login.go rename to routes/login.go index 9c659e9..32ab6d8 100644 --- a/backend/routes/login.go +++ b/routes/login.go @@ -5,11 +5,11 @@ import ( "html/template" "net/http" "net/url" - "shelves/backend/auth" - "shelves/backend/errorsx" - "shelves/backend/forms" - "shelves/backend/httpx" - "shelves/backend/templates" + "shelves/auth" + "shelves/errorsx" + "shelves/forms" + "shelves/httpx" + "shelves/templates" ) type loginForm struct { diff --git a/backend/routes/routes.go b/routes/routes.go similarity index 98% rename from backend/routes/routes.go rename to routes/routes.go index 5ce721d..c824b6e 100644 --- a/backend/routes/routes.go +++ b/routes/routes.go @@ -3,7 +3,7 @@ package routes import ( "html/template" "net/http" - "shelves/backend/httpx" + "shelves/httpx" "strings" "time" diff --git a/backend/routes/settings.go b/routes/settings.go similarity index 96% rename from backend/routes/settings.go rename to routes/settings.go index 7ec70ae..a53f3a7 100644 --- a/backend/routes/settings.go +++ b/routes/settings.go @@ -6,11 +6,11 @@ import ( "html/template" "net/http" "net/url" - "shelves/backend/auth" - "shelves/backend/errorsx" - "shelves/backend/forms" - "shelves/backend/httpx" - "shelves/backend/templates" + "shelves/auth" + "shelves/errorsx" + "shelves/forms" + "shelves/httpx" + "shelves/templates" ) func settingsRenderView(f settingsForm, e settingsFormErrors) template.HTML { diff --git a/backend/templates/form.go b/templates/form.go similarity index 100% rename from backend/templates/form.go rename to templates/form.go diff --git a/backend/templates/page.go b/templates/page.go similarity index 95% rename from backend/templates/page.go rename to templates/page.go index 49d9e41..72a0f05 100644 --- a/backend/templates/page.go +++ b/templates/page.go @@ -2,7 +2,7 @@ package templates import ( "html/template" - "shelves/backend/auth" + "shelves/auth" ) type PageBase struct { diff --git a/backend/templates/templates.go b/templates/templates.go similarity index 100% rename from backend/templates/templates.go rename to templates/templates.go diff --git a/backend/templates/tmpls/form.tmpl.html b/templates/tmpls/form.tmpl.html similarity index 100% rename from backend/templates/tmpls/form.tmpl.html rename to templates/tmpls/form.tmpl.html diff --git a/backend/templates/tmpls/home.tmpl.html b/templates/tmpls/home.tmpl.html similarity index 100% rename from backend/templates/tmpls/home.tmpl.html rename to templates/tmpls/home.tmpl.html diff --git a/backend/templates/tmpls/page.tmpl.html b/templates/tmpls/page.tmpl.html similarity index 100% rename from backend/templates/tmpls/page.tmpl.html rename to templates/tmpls/page.tmpl.html diff --git a/backend/templates/tmpls/page_base.tmpl.html b/templates/tmpls/page_base.tmpl.html similarity index 100% rename from backend/templates/tmpls/page_base.tmpl.html rename to templates/tmpls/page_base.tmpl.html diff --git a/backend/urls/urls.go b/urls/urls.go similarity index 100% rename from backend/urls/urls.go rename to urls/urls.go