From f45a94622ef2d34a64714011e609e02a2aa0d089 Mon Sep 17 00:00:00 2001 From: Acid Date: Sat, 6 Jun 2026 04:05:48 -0400 Subject: [PATCH] changed tree --- .air.toml | 14 ++++++++++++++ Dockerfile | 4 ++-- connections.go => src/connections.go | 1 - main.go => src/main.go | 0 seed.sql => src/seed.sql | 0 5 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 .air.toml rename connections.go => src/connections.go (95%) rename main.go => src/main.go (100%) rename seed.sql => src/seed.sql (100%) diff --git a/.air.toml b/.air.toml new file mode 100644 index 0000000..40a591f --- /dev/null +++ b/.air.toml @@ -0,0 +1,14 @@ +root = "." +tmp_dir = "tmp" + +[build] + cmd = "go build -o ./tmp/main ./src" + bin = "./tmp/main" + include_ext = ["go", "html", "sql", "css", "js"] + include_dir = ["src", "templates", "static"] + exclude_dir = ["tmp", "scrap", ".git", ".vscode"] + delay = 1000 + stop_on_error = true + +[misc] + clean_on_exit = true diff --git a/Dockerfile b/Dockerfile index 8377f22..30ff1f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,8 @@ WORKDIR /app COPY go.mod go.sum ./ RUN go mod download -COPY *.go ./ -COPY seed.sql ./ +COPY src/*.go ./ +COPY src/seed.sql ./ ENV CGO_ENABLED=1 RUN go build -o server . diff --git a/connections.go b/src/connections.go similarity index 95% rename from connections.go rename to src/connections.go index 2be8246..7d6bee8 100644 --- a/connections.go +++ b/src/connections.go @@ -24,7 +24,6 @@ type dbStruct struct { } // Seed runs the schema in seed.sql. Idempotent via CREATE TABLE IF NOT EXISTS, -// so it's safe to call on every startup. func (app *dbStruct) Seed() error { _, err := app.db.Exec(seedSQL) return err diff --git a/main.go b/src/main.go similarity index 100% rename from main.go rename to src/main.go diff --git a/seed.sql b/src/seed.sql similarity index 100% rename from seed.sql rename to src/seed.sql