lift things out of backend/

This commit is contained in:
soup 2024-11-15 15:20:56 -05:00
parent e8d775d96d
commit 9e03bdb2de
21 changed files with 22 additions and 22 deletions

View file

@ -1,10 +1,10 @@
.PHONY: build .PHONY: build
build: build:
go build backend/bin/shelves.go go build bin/shelves.go
run: run:
go run backend/bin/shelves.go go run bin/shelves.go
watch: watch:
fd | entr -cr make run fd | entr -cr make run

View file

@ -7,9 +7,9 @@ import (
_ "github.com/mattn/go-sqlite3" _ "github.com/mattn/go-sqlite3"
"shelves/backend/db" "shelves/db"
"shelves/backend/httpx" "shelves/httpx"
"shelves/backend/routes" "shelves/routes"
) )
func main() { func main() {

View file

@ -4,8 +4,8 @@ import (
"log" "log"
"net/http" "net/http"
"net/url" "net/url"
"shelves/backend/errorsx" "shelves/errorsx"
"shelves/backend/urls" "shelves/urls"
) )
func SeeOther(w http.ResponseWriter, location string) { func SeeOther(w http.ResponseWriter, location string) {

View file

@ -5,7 +5,7 @@ import (
"database/sql" "database/sql"
"log" "log"
"net/http" "net/http"
"shelves/backend/auth" "shelves/auth"
"time" "time"
) )

View file

@ -2,8 +2,8 @@ package routes
import ( import (
"net/http" "net/http"
"shelves/backend/httpx" "shelves/httpx"
"shelves/backend/templates" "shelves/templates"
) )
type homeTemplate struct { type homeTemplate struct {

View file

@ -5,11 +5,11 @@ import (
"html/template" "html/template"
"net/http" "net/http"
"net/url" "net/url"
"shelves/backend/auth" "shelves/auth"
"shelves/backend/errorsx" "shelves/errorsx"
"shelves/backend/forms" "shelves/forms"
"shelves/backend/httpx" "shelves/httpx"
"shelves/backend/templates" "shelves/templates"
) )
type loginForm struct { type loginForm struct {

View file

@ -3,7 +3,7 @@ package routes
import ( import (
"html/template" "html/template"
"net/http" "net/http"
"shelves/backend/httpx" "shelves/httpx"
"strings" "strings"
"time" "time"

View file

@ -6,11 +6,11 @@ import (
"html/template" "html/template"
"net/http" "net/http"
"net/url" "net/url"
"shelves/backend/auth" "shelves/auth"
"shelves/backend/errorsx" "shelves/errorsx"
"shelves/backend/forms" "shelves/forms"
"shelves/backend/httpx" "shelves/httpx"
"shelves/backend/templates" "shelves/templates"
) )
func settingsRenderView(f settingsForm, e settingsFormErrors) template.HTML { func settingsRenderView(f settingsForm, e settingsFormErrors) template.HTML {

View file

@ -2,7 +2,7 @@ package templates
import ( import (
"html/template" "html/template"
"shelves/backend/auth" "shelves/auth"
) )
type PageBase struct { type PageBase struct {