refactor(internal): replace log.Fatal with panic, add timezone to DSN, add empty S3 bucket check

Replace log.Fatal in dev service init with panic for consistency. Add timezone=UTC to DAV connection DSN. Add IsEmpty() check for S3 dev bucket.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-06-24 23:43:14 +01:00
co-authored by Sisyphus
parent e95b1a65af
commit 58996c553a
7 changed files with 136 additions and 61 deletions
+2 -3
View File
@@ -6,7 +6,6 @@ package dav
import (
"context"
"fmt"
"log"
"os"
"github.com/jackc/pgx/v5/pgxpool"
@@ -20,13 +19,13 @@ func init() {
if os.Getenv("GO_TESTING") != "" {
return
}
log.Fatalf("failed to initialize dev service: %v", err)
panic("failed to initialize dev service: " + err.Error())
}
}
func connect() error {
dsn := fmt.Sprintf(
"postgres://%s:%s@localhost:5432/%s?sslmode=disable&require_auth=scram-sha-256",
"postgres://%s:%s@localhost:5432/%s?sslmode=disable&timezone=UTC&require_auth=scram-sha-256",
getEnv("POSTGRES_USER"),
getEnv("POSTGRES_PASSWORD"),
getEnv("POSTGRES_DB"),