diff --git a/.golangci.yml b/.golangci.yml index 961c8c8..59bc7bc 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -35,7 +35,7 @@ formatters: settings: goimports: local-prefixes: - - github.com/ryanhamamura/c4 + - github.com/ryanhamamura/games issues: exclude-rules: diff --git a/chat/components/chat.templ b/chat/components/chat.templ index da7e329..ec10136 100644 --- a/chat/components/chat.templ +++ b/chat/components/chat.templ @@ -3,7 +3,7 @@ package components import ( "fmt" - "github.com/ryanhamamura/c4/chat" + "github.com/ryanhamamura/games/chat" "github.com/starfederation/datastar-go/datastar" ) diff --git a/chat/persist.go b/chat/persist.go index 0297b42..45b6ee7 100644 --- a/chat/persist.go +++ b/chat/persist.go @@ -4,7 +4,7 @@ import ( "context" "slices" - "github.com/ryanhamamura/c4/db/repository" + "github.com/ryanhamamura/games/db/repository" "github.com/rs/zerolog/log" ) diff --git a/connect4/persist.go b/connect4/persist.go index 9772b93..5e311ad 100644 --- a/connect4/persist.go +++ b/connect4/persist.go @@ -3,8 +3,8 @@ package connect4 import ( "context" - "github.com/ryanhamamura/c4/db/repository" - "github.com/ryanhamamura/c4/player" + "github.com/ryanhamamura/games/db/repository" + "github.com/ryanhamamura/games/player" "github.com/rs/zerolog/log" ) diff --git a/connect4/store.go b/connect4/store.go index fe68b1e..2f1bba6 100644 --- a/connect4/store.go +++ b/connect4/store.go @@ -4,8 +4,8 @@ import ( "context" "sync" - "github.com/ryanhamamura/c4/db/repository" - "github.com/ryanhamamura/c4/player" + "github.com/ryanhamamura/games/db/repository" + "github.com/ryanhamamura/games/player" ) type PlayerSession struct { diff --git a/connect4/types.go b/connect4/types.go index 0dac3d8..a423030 100644 --- a/connect4/types.go +++ b/connect4/types.go @@ -3,7 +3,7 @@ package connect4 import ( "encoding/json" - "github.com/ryanhamamura/c4/player" + "github.com/ryanhamamura/games/player" ) type Player struct { diff --git a/features/auth/handlers.go b/features/auth/handlers.go index dc34675..8c7c8fb 100644 --- a/features/auth/handlers.go +++ b/features/auth/handlers.go @@ -8,9 +8,9 @@ import ( "github.com/google/uuid" "github.com/starfederation/datastar-go/datastar" - "github.com/ryanhamamura/c4/auth" - "github.com/ryanhamamura/c4/db/repository" - "github.com/ryanhamamura/c4/features/auth/pages" + "github.com/ryanhamamura/games/auth" + "github.com/ryanhamamura/games/db/repository" + "github.com/ryanhamamura/games/features/auth/pages" ) type LoginSignals struct { diff --git a/features/auth/pages/login.templ b/features/auth/pages/login.templ index 3a4bcae..8a93ff9 100644 --- a/features/auth/pages/login.templ +++ b/features/auth/pages/login.templ @@ -1,7 +1,7 @@ package pages import ( - "github.com/ryanhamamura/c4/features/common/layouts" + "github.com/ryanhamamura/games/features/common/layouts" "github.com/starfederation/datastar-go/datastar" ) diff --git a/features/auth/pages/register.templ b/features/auth/pages/register.templ index 00ef50a..92fd0c4 100644 --- a/features/auth/pages/register.templ +++ b/features/auth/pages/register.templ @@ -1,7 +1,7 @@ package pages import ( - "github.com/ryanhamamura/c4/features/common/layouts" + "github.com/ryanhamamura/games/features/common/layouts" "github.com/starfederation/datastar-go/datastar" ) diff --git a/features/auth/routes.go b/features/auth/routes.go index 16e5e85..bb39e44 100644 --- a/features/auth/routes.go +++ b/features/auth/routes.go @@ -5,7 +5,7 @@ import ( "github.com/alexedwards/scs/v2" "github.com/go-chi/chi/v5" - "github.com/ryanhamamura/c4/db/repository" + "github.com/ryanhamamura/games/db/repository" ) func SetupRoutes(router chi.Router, queries *repository.Queries, sessions *scs.SessionManager) { diff --git a/features/c4game/components/board.templ b/features/c4game/components/board.templ index 6ac381c..07bbd2a 100644 --- a/features/c4game/components/board.templ +++ b/features/c4game/components/board.templ @@ -3,7 +3,7 @@ package components import ( "fmt" - "github.com/ryanhamamura/c4/connect4" + "github.com/ryanhamamura/games/connect4" "github.com/starfederation/datastar-go/datastar" ) diff --git a/features/c4game/components/status.templ b/features/c4game/components/status.templ index c2e6483..161d1c6 100644 --- a/features/c4game/components/status.templ +++ b/features/c4game/components/status.templ @@ -1,8 +1,8 @@ package components import ( - "github.com/ryanhamamura/c4/config" - "github.com/ryanhamamura/c4/connect4" + "github.com/ryanhamamura/games/config" + "github.com/ryanhamamura/games/connect4" "github.com/starfederation/datastar-go/datastar" ) diff --git a/features/c4game/handlers.go b/features/c4game/handlers.go index c82573d..79461d9 100644 --- a/features/c4game/handlers.go +++ b/features/c4game/handlers.go @@ -11,13 +11,13 @@ import ( "github.com/nats-io/nats.go" "github.com/starfederation/datastar-go/datastar" - "github.com/ryanhamamura/c4/chat" - chatcomponents "github.com/ryanhamamura/c4/chat/components" - "github.com/ryanhamamura/c4/connect4" - "github.com/ryanhamamura/c4/db/repository" - "github.com/ryanhamamura/c4/features/c4game/components" - "github.com/ryanhamamura/c4/features/c4game/pages" - "github.com/ryanhamamura/c4/sessions" + "github.com/ryanhamamura/games/chat" + chatcomponents "github.com/ryanhamamura/games/chat/components" + "github.com/ryanhamamura/games/connect4" + "github.com/ryanhamamura/games/db/repository" + "github.com/ryanhamamura/games/features/c4game/components" + "github.com/ryanhamamura/games/features/c4game/pages" + "github.com/ryanhamamura/games/sessions" ) // c4ChatColors maps player color (1=Red, 2=Yellow) to CSS background colors. diff --git a/features/c4game/pages/game.templ b/features/c4game/pages/game.templ index 19d8418..16e0155 100644 --- a/features/c4game/pages/game.templ +++ b/features/c4game/pages/game.templ @@ -1,12 +1,12 @@ package pages import ( - "github.com/ryanhamamura/c4/chat" - chatcomponents "github.com/ryanhamamura/c4/chat/components" - "github.com/ryanhamamura/c4/connect4" - "github.com/ryanhamamura/c4/features/c4game/components" - sharedcomponents "github.com/ryanhamamura/c4/features/common/components" - "github.com/ryanhamamura/c4/features/common/layouts" + "github.com/ryanhamamura/games/chat" + chatcomponents "github.com/ryanhamamura/games/chat/components" + "github.com/ryanhamamura/games/connect4" + "github.com/ryanhamamura/games/features/c4game/components" + sharedcomponents "github.com/ryanhamamura/games/features/common/components" + "github.com/ryanhamamura/games/features/common/layouts" "github.com/starfederation/datastar-go/datastar" ) diff --git a/features/c4game/routes.go b/features/c4game/routes.go index bc35047..e936fd4 100644 --- a/features/c4game/routes.go +++ b/features/c4game/routes.go @@ -6,8 +6,8 @@ import ( "github.com/go-chi/chi/v5" "github.com/nats-io/nats.go" - "github.com/ryanhamamura/c4/connect4" - "github.com/ryanhamamura/c4/db/repository" + "github.com/ryanhamamura/games/connect4" + "github.com/ryanhamamura/games/db/repository" ) func SetupRoutes( diff --git a/features/common/layouts/base.templ b/features/common/layouts/base.templ index ffd9585..86d563a 100644 --- a/features/common/layouts/base.templ +++ b/features/common/layouts/base.templ @@ -1,6 +1,6 @@ package layouts -import "github.com/ryanhamamura/c4/config" +import "github.com/ryanhamamura/games/config" templ Base(title string) { diff --git a/features/lobby/components/gamelist.templ b/features/lobby/components/gamelist.templ index 3fbcb5c..73efab3 100644 --- a/features/lobby/components/gamelist.templ +++ b/features/lobby/components/gamelist.templ @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/ryanhamamura/c4/connect4" + "github.com/ryanhamamura/games/connect4" "github.com/starfederation/datastar-go/datastar" ) diff --git a/features/lobby/handlers.go b/features/lobby/handlers.go index 609eee3..5698447 100644 --- a/features/lobby/handlers.go +++ b/features/lobby/handlers.go @@ -7,11 +7,11 @@ import ( "strconv" "time" - "github.com/ryanhamamura/c4/connect4" - "github.com/ryanhamamura/c4/db/repository" - lobbycomponents "github.com/ryanhamamura/c4/features/lobby/components" - "github.com/ryanhamamura/c4/features/lobby/pages" - "github.com/ryanhamamura/c4/snake" + "github.com/ryanhamamura/games/connect4" + "github.com/ryanhamamura/games/db/repository" + lobbycomponents "github.com/ryanhamamura/games/features/lobby/components" + "github.com/ryanhamamura/games/features/lobby/pages" + "github.com/ryanhamamura/games/snake" "github.com/alexedwards/scs/v2" "github.com/go-chi/chi/v5" diff --git a/features/lobby/pages/lobby.templ b/features/lobby/pages/lobby.templ index cff0080..c2dde2e 100644 --- a/features/lobby/pages/lobby.templ +++ b/features/lobby/pages/lobby.templ @@ -3,10 +3,10 @@ package pages import ( "fmt" - "github.com/ryanhamamura/c4/features/common/components" - "github.com/ryanhamamura/c4/features/common/layouts" - lobbycomponents "github.com/ryanhamamura/c4/features/lobby/components" - "github.com/ryanhamamura/c4/snake" + "github.com/ryanhamamura/games/features/common/components" + "github.com/ryanhamamura/games/features/common/layouts" + lobbycomponents "github.com/ryanhamamura/games/features/lobby/components" + "github.com/ryanhamamura/games/snake" "github.com/starfederation/datastar-go/datastar" ) diff --git a/features/lobby/pages/types.go b/features/lobby/pages/types.go index a386a6f..89acc28 100644 --- a/features/lobby/pages/types.go +++ b/features/lobby/pages/types.go @@ -1,6 +1,6 @@ package pages -import "github.com/ryanhamamura/c4/features/lobby/components" +import "github.com/ryanhamamura/games/features/lobby/components" // SnakeGameListItem represents a joinable snake game in the lobby. type SnakeGameListItem struct { diff --git a/features/lobby/routes.go b/features/lobby/routes.go index 103f3de..bec75e2 100644 --- a/features/lobby/routes.go +++ b/features/lobby/routes.go @@ -2,9 +2,9 @@ package lobby import ( - "github.com/ryanhamamura/c4/connect4" - "github.com/ryanhamamura/c4/db/repository" - "github.com/ryanhamamura/c4/snake" + "github.com/ryanhamamura/games/connect4" + "github.com/ryanhamamura/games/db/repository" + "github.com/ryanhamamura/games/snake" "github.com/alexedwards/scs/v2" "github.com/go-chi/chi/v5" diff --git a/features/snakegame/components/board.templ b/features/snakegame/components/board.templ index 6083935..9c4c156 100644 --- a/features/snakegame/components/board.templ +++ b/features/snakegame/components/board.templ @@ -3,7 +3,7 @@ package components import ( "fmt" - "github.com/ryanhamamura/c4/snake" + "github.com/ryanhamamura/games/snake" ) func cellSizeForGrid(width, height int) int { diff --git a/features/snakegame/components/status.templ b/features/snakegame/components/status.templ index b09613d..d1b045e 100644 --- a/features/snakegame/components/status.templ +++ b/features/snakegame/components/status.templ @@ -5,8 +5,8 @@ import ( "math" "time" - "github.com/ryanhamamura/c4/config" - "github.com/ryanhamamura/c4/snake" + "github.com/ryanhamamura/games/config" + "github.com/ryanhamamura/games/snake" "github.com/starfederation/datastar-go/datastar" ) diff --git a/features/snakegame/handlers.go b/features/snakegame/handlers.go index 13dde02..5f518dd 100644 --- a/features/snakegame/handlers.go +++ b/features/snakegame/handlers.go @@ -10,12 +10,12 @@ import ( "github.com/nats-io/nats.go" "github.com/starfederation/datastar-go/datastar" - "github.com/ryanhamamura/c4/chat" - chatcomponents "github.com/ryanhamamura/c4/chat/components" - "github.com/ryanhamamura/c4/features/snakegame/components" - "github.com/ryanhamamura/c4/features/snakegame/pages" - "github.com/ryanhamamura/c4/sessions" - "github.com/ryanhamamura/c4/snake" + "github.com/ryanhamamura/games/chat" + chatcomponents "github.com/ryanhamamura/games/chat/components" + "github.com/ryanhamamura/games/features/snakegame/components" + "github.com/ryanhamamura/games/features/snakegame/pages" + "github.com/ryanhamamura/games/sessions" + "github.com/ryanhamamura/games/snake" ) func snakeChatColor(slot int) string { diff --git a/features/snakegame/pages/game.templ b/features/snakegame/pages/game.templ index 46fe32d..63bda61 100644 --- a/features/snakegame/pages/game.templ +++ b/features/snakegame/pages/game.templ @@ -3,12 +3,12 @@ package pages import ( "fmt" - "github.com/ryanhamamura/c4/chat" - chatcomponents "github.com/ryanhamamura/c4/chat/components" - "github.com/ryanhamamura/c4/features/common/components" - "github.com/ryanhamamura/c4/features/common/layouts" - snakecomponents "github.com/ryanhamamura/c4/features/snakegame/components" - "github.com/ryanhamamura/c4/snake" + "github.com/ryanhamamura/games/chat" + chatcomponents "github.com/ryanhamamura/games/chat/components" + "github.com/ryanhamamura/games/features/common/components" + "github.com/ryanhamamura/games/features/common/layouts" + snakecomponents "github.com/ryanhamamura/games/features/snakegame/components" + "github.com/ryanhamamura/games/snake" "github.com/starfederation/datastar-go/datastar" ) diff --git a/features/snakegame/routes.go b/features/snakegame/routes.go index 880c073..0f30757 100644 --- a/features/snakegame/routes.go +++ b/features/snakegame/routes.go @@ -6,7 +6,7 @@ import ( "github.com/go-chi/chi/v5" "github.com/nats-io/nats.go" - "github.com/ryanhamamura/c4/snake" + "github.com/ryanhamamura/games/snake" ) func SetupRoutes(router chi.Router, snakeStore *snake.SnakeStore, nc *nats.Conn, sessions *scs.SessionManager) { diff --git a/go.mod b/go.mod index d7a24c5..069eb86 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/ryanhamamura/c4 +module github.com/ryanhamamura/games go 1.25.4 diff --git a/logging/log.go b/logging/log.go index 4cdaed3..7a4245d 100644 --- a/logging/log.go +++ b/logging/log.go @@ -6,7 +6,7 @@ import ( stdlog "log" "os" - "github.com/ryanhamamura/c4/config" + "github.com/ryanhamamura/games/config" "github.com/rs/zerolog" "github.com/rs/zerolog/log" diff --git a/logging/middleware.go b/logging/middleware.go index dd6404e..be6c21a 100644 --- a/logging/middleware.go +++ b/logging/middleware.go @@ -5,7 +5,7 @@ import ( "net/http" "time" - "github.com/ryanhamamura/c4/config" + "github.com/ryanhamamura/games/config" "github.com/rs/zerolog" "github.com/rs/zerolog/log" diff --git a/main.go b/main.go index 04c3f51..4bf49a3 100644 --- a/main.go +++ b/main.go @@ -11,15 +11,15 @@ import ( "syscall" "time" - "github.com/ryanhamamura/c4/config" - "github.com/ryanhamamura/c4/connect4" - "github.com/ryanhamamura/c4/db" - "github.com/ryanhamamura/c4/db/repository" - "github.com/ryanhamamura/c4/logging" - appnats "github.com/ryanhamamura/c4/nats" - "github.com/ryanhamamura/c4/router" - "github.com/ryanhamamura/c4/sessions" - "github.com/ryanhamamura/c4/snake" + "github.com/ryanhamamura/games/config" + "github.com/ryanhamamura/games/connect4" + "github.com/ryanhamamura/games/db" + "github.com/ryanhamamura/games/db/repository" + "github.com/ryanhamamura/games/logging" + appnats "github.com/ryanhamamura/games/nats" + "github.com/ryanhamamura/games/router" + "github.com/ryanhamamura/games/sessions" + "github.com/ryanhamamura/games/snake" "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" diff --git a/router/router.go b/router/router.go index ce62137..1a2cd8f 100644 --- a/router/router.go +++ b/router/router.go @@ -7,14 +7,14 @@ import ( "net/http" "sync" - "github.com/ryanhamamura/c4/config" - "github.com/ryanhamamura/c4/connect4" - "github.com/ryanhamamura/c4/db/repository" - "github.com/ryanhamamura/c4/features/auth" - "github.com/ryanhamamura/c4/features/c4game" - "github.com/ryanhamamura/c4/features/lobby" - "github.com/ryanhamamura/c4/features/snakegame" - "github.com/ryanhamamura/c4/snake" + "github.com/ryanhamamura/games/config" + "github.com/ryanhamamura/games/connect4" + "github.com/ryanhamamura/games/db/repository" + "github.com/ryanhamamura/games/features/auth" + "github.com/ryanhamamura/games/features/c4game" + "github.com/ryanhamamura/games/features/lobby" + "github.com/ryanhamamura/games/features/snakegame" + "github.com/ryanhamamura/games/snake" "github.com/alexedwards/scs/v2" "github.com/go-chi/chi/v5" diff --git a/sessions/sessions.go b/sessions/sessions.go index c4e50d6..fdbbe08 100644 --- a/sessions/sessions.go +++ b/sessions/sessions.go @@ -8,7 +8,7 @@ import ( "net/http" "time" - "github.com/ryanhamamura/c4/player" + "github.com/ryanhamamura/games/player" "github.com/alexedwards/scs/sqlite3store" "github.com/alexedwards/scs/v2" diff --git a/snake/persist.go b/snake/persist.go index 741cb40..e044a61 100644 --- a/snake/persist.go +++ b/snake/persist.go @@ -3,8 +3,8 @@ package snake import ( "context" - "github.com/ryanhamamura/c4/db/repository" - "github.com/ryanhamamura/c4/player" + "github.com/ryanhamamura/games/db/repository" + "github.com/ryanhamamura/games/player" "github.com/rs/zerolog/log" ) diff --git a/snake/store.go b/snake/store.go index 2590a4a..888dfa2 100644 --- a/snake/store.go +++ b/snake/store.go @@ -4,8 +4,8 @@ import ( "context" "sync" - "github.com/ryanhamamura/c4/db/repository" - "github.com/ryanhamamura/c4/player" + "github.com/ryanhamamura/games/db/repository" + "github.com/ryanhamamura/games/player" ) type SnakeStore struct { diff --git a/snake/types.go b/snake/types.go index bbcb836..62376f9 100644 --- a/snake/types.go +++ b/snake/types.go @@ -4,7 +4,7 @@ import ( "encoding/json" "time" - "github.com/ryanhamamura/c4/player" + "github.com/ryanhamamura/games/player" ) type Direction int diff --git a/testutil/db.go b/testutil/db.go index d2cb2f9..e642aba 100644 --- a/testutil/db.go +++ b/testutil/db.go @@ -8,8 +8,8 @@ import ( "io/fs" "testing" - "github.com/ryanhamamura/c4/db" - "github.com/ryanhamamura/c4/db/repository" + "github.com/ryanhamamura/games/db" + "github.com/ryanhamamura/games/db/repository" "github.com/pressly/goose/v3" _ "modernc.org/sqlite"