refactor: adopt portigo infrastructure patterns
Add config package with build-tag-switched dev/prod environments, structured logging via zerolog, Taskfile for dev workflow, golangci-lint config, testutil package, and improved DB setup with proper SQLite pragmas and cleanup. Rename sqlc output package from gen to repository. Switch to allowlist .gitignore, Alpine+UPX+scratch Dockerfile, and CI pipeline with test/lint gates before deploy.
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/ryanhamamura/c4/config"
|
||||
"github.com/ryanhamamura/c4/game"
|
||||
"github.com/ryanhamamura/via/h"
|
||||
)
|
||||
@@ -118,10 +117,7 @@ func PlayerInfo(g *game.Game, myColor int) h.H {
|
||||
}
|
||||
|
||||
func getBaseURL() string {
|
||||
if url := os.Getenv("APP_URL"); url != "" {
|
||||
return url
|
||||
}
|
||||
return "https://games.adriatica.io"
|
||||
return config.Global.AppURL
|
||||
}
|
||||
|
||||
func InviteLink(gameID string) h.H {
|
||||
|
||||
Reference in New Issue
Block a user