refactor: rename Go module from c4 to games
All checks were successful
CI / Deploy / test (pull_request) Successful in 14s
CI / Deploy / lint (pull_request) Successful in 25s
CI / Deploy / deploy (pull_request) Has been skipped

Rename module path github.com/ryanhamamura/c4 to
github.com/ryanhamamura/games across go.mod, all source files,
and golangci config.
This commit is contained in:
Ryan Hamamura
2026-03-02 20:41:20 -10:00
parent 38eb9ee398
commit c6885a069b
36 changed files with 91 additions and 91 deletions

View File

@@ -35,7 +35,7 @@ formatters:
settings: settings:
goimports: goimports:
local-prefixes: local-prefixes:
- github.com/ryanhamamura/c4 - github.com/ryanhamamura/games
issues: issues:
exclude-rules: exclude-rules:

View File

@@ -3,7 +3,7 @@ package components
import ( import (
"fmt" "fmt"
"github.com/ryanhamamura/c4/chat" "github.com/ryanhamamura/games/chat"
"github.com/starfederation/datastar-go/datastar" "github.com/starfederation/datastar-go/datastar"
) )

View File

@@ -4,7 +4,7 @@ import (
"context" "context"
"slices" "slices"
"github.com/ryanhamamura/c4/db/repository" "github.com/ryanhamamura/games/db/repository"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
) )

View File

@@ -3,8 +3,8 @@ package connect4
import ( import (
"context" "context"
"github.com/ryanhamamura/c4/db/repository" "github.com/ryanhamamura/games/db/repository"
"github.com/ryanhamamura/c4/player" "github.com/ryanhamamura/games/player"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
) )

View File

@@ -4,8 +4,8 @@ import (
"context" "context"
"sync" "sync"
"github.com/ryanhamamura/c4/db/repository" "github.com/ryanhamamura/games/db/repository"
"github.com/ryanhamamura/c4/player" "github.com/ryanhamamura/games/player"
) )
type PlayerSession struct { type PlayerSession struct {

View File

@@ -3,7 +3,7 @@ package connect4
import ( import (
"encoding/json" "encoding/json"
"github.com/ryanhamamura/c4/player" "github.com/ryanhamamura/games/player"
) )
type Player struct { type Player struct {

View File

@@ -8,9 +8,9 @@ import (
"github.com/google/uuid" "github.com/google/uuid"
"github.com/starfederation/datastar-go/datastar" "github.com/starfederation/datastar-go/datastar"
"github.com/ryanhamamura/c4/auth" "github.com/ryanhamamura/games/auth"
"github.com/ryanhamamura/c4/db/repository" "github.com/ryanhamamura/games/db/repository"
"github.com/ryanhamamura/c4/features/auth/pages" "github.com/ryanhamamura/games/features/auth/pages"
) )
type LoginSignals struct { type LoginSignals struct {

View File

@@ -1,7 +1,7 @@
package pages package pages
import ( import (
"github.com/ryanhamamura/c4/features/common/layouts" "github.com/ryanhamamura/games/features/common/layouts"
"github.com/starfederation/datastar-go/datastar" "github.com/starfederation/datastar-go/datastar"
) )

View File

@@ -1,7 +1,7 @@
package pages package pages
import ( import (
"github.com/ryanhamamura/c4/features/common/layouts" "github.com/ryanhamamura/games/features/common/layouts"
"github.com/starfederation/datastar-go/datastar" "github.com/starfederation/datastar-go/datastar"
) )

View File

@@ -5,7 +5,7 @@ import (
"github.com/alexedwards/scs/v2" "github.com/alexedwards/scs/v2"
"github.com/go-chi/chi/v5" "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) { func SetupRoutes(router chi.Router, queries *repository.Queries, sessions *scs.SessionManager) {

View File

@@ -3,7 +3,7 @@ package components
import ( import (
"fmt" "fmt"
"github.com/ryanhamamura/c4/connect4" "github.com/ryanhamamura/games/connect4"
"github.com/starfederation/datastar-go/datastar" "github.com/starfederation/datastar-go/datastar"
) )

View File

@@ -1,8 +1,8 @@
package components package components
import ( import (
"github.com/ryanhamamura/c4/config" "github.com/ryanhamamura/games/config"
"github.com/ryanhamamura/c4/connect4" "github.com/ryanhamamura/games/connect4"
"github.com/starfederation/datastar-go/datastar" "github.com/starfederation/datastar-go/datastar"
) )

View File

@@ -11,13 +11,13 @@ import (
"github.com/nats-io/nats.go" "github.com/nats-io/nats.go"
"github.com/starfederation/datastar-go/datastar" "github.com/starfederation/datastar-go/datastar"
"github.com/ryanhamamura/c4/chat" "github.com/ryanhamamura/games/chat"
chatcomponents "github.com/ryanhamamura/c4/chat/components" chatcomponents "github.com/ryanhamamura/games/chat/components"
"github.com/ryanhamamura/c4/connect4" "github.com/ryanhamamura/games/connect4"
"github.com/ryanhamamura/c4/db/repository" "github.com/ryanhamamura/games/db/repository"
"github.com/ryanhamamura/c4/features/c4game/components" "github.com/ryanhamamura/games/features/c4game/components"
"github.com/ryanhamamura/c4/features/c4game/pages" "github.com/ryanhamamura/games/features/c4game/pages"
"github.com/ryanhamamura/c4/sessions" "github.com/ryanhamamura/games/sessions"
) )
// c4ChatColors maps player color (1=Red, 2=Yellow) to CSS background colors. // c4ChatColors maps player color (1=Red, 2=Yellow) to CSS background colors.

View File

@@ -1,12 +1,12 @@
package pages package pages
import ( import (
"github.com/ryanhamamura/c4/chat" "github.com/ryanhamamura/games/chat"
chatcomponents "github.com/ryanhamamura/c4/chat/components" chatcomponents "github.com/ryanhamamura/games/chat/components"
"github.com/ryanhamamura/c4/connect4" "github.com/ryanhamamura/games/connect4"
"github.com/ryanhamamura/c4/features/c4game/components" "github.com/ryanhamamura/games/features/c4game/components"
sharedcomponents "github.com/ryanhamamura/c4/features/common/components" sharedcomponents "github.com/ryanhamamura/games/features/common/components"
"github.com/ryanhamamura/c4/features/common/layouts" "github.com/ryanhamamura/games/features/common/layouts"
"github.com/starfederation/datastar-go/datastar" "github.com/starfederation/datastar-go/datastar"
) )

View File

@@ -6,8 +6,8 @@ import (
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"
"github.com/nats-io/nats.go" "github.com/nats-io/nats.go"
"github.com/ryanhamamura/c4/connect4" "github.com/ryanhamamura/games/connect4"
"github.com/ryanhamamura/c4/db/repository" "github.com/ryanhamamura/games/db/repository"
) )
func SetupRoutes( func SetupRoutes(

View File

@@ -1,6 +1,6 @@
package layouts package layouts
import "github.com/ryanhamamura/c4/config" import "github.com/ryanhamamura/games/config"
templ Base(title string) { templ Base(title string) {
<!DOCTYPE html> <!DOCTYPE html>

View File

@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/ryanhamamura/c4/connect4" "github.com/ryanhamamura/games/connect4"
"github.com/starfederation/datastar-go/datastar" "github.com/starfederation/datastar-go/datastar"
) )

View File

@@ -7,11 +7,11 @@ import (
"strconv" "strconv"
"time" "time"
"github.com/ryanhamamura/c4/connect4" "github.com/ryanhamamura/games/connect4"
"github.com/ryanhamamura/c4/db/repository" "github.com/ryanhamamura/games/db/repository"
lobbycomponents "github.com/ryanhamamura/c4/features/lobby/components" lobbycomponents "github.com/ryanhamamura/games/features/lobby/components"
"github.com/ryanhamamura/c4/features/lobby/pages" "github.com/ryanhamamura/games/features/lobby/pages"
"github.com/ryanhamamura/c4/snake" "github.com/ryanhamamura/games/snake"
"github.com/alexedwards/scs/v2" "github.com/alexedwards/scs/v2"
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"

View File

@@ -3,10 +3,10 @@ package pages
import ( import (
"fmt" "fmt"
"github.com/ryanhamamura/c4/features/common/components" "github.com/ryanhamamura/games/features/common/components"
"github.com/ryanhamamura/c4/features/common/layouts" "github.com/ryanhamamura/games/features/common/layouts"
lobbycomponents "github.com/ryanhamamura/c4/features/lobby/components" lobbycomponents "github.com/ryanhamamura/games/features/lobby/components"
"github.com/ryanhamamura/c4/snake" "github.com/ryanhamamura/games/snake"
"github.com/starfederation/datastar-go/datastar" "github.com/starfederation/datastar-go/datastar"
) )

View File

@@ -1,6 +1,6 @@
package pages 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. // SnakeGameListItem represents a joinable snake game in the lobby.
type SnakeGameListItem struct { type SnakeGameListItem struct {

View File

@@ -2,9 +2,9 @@
package lobby package lobby
import ( import (
"github.com/ryanhamamura/c4/connect4" "github.com/ryanhamamura/games/connect4"
"github.com/ryanhamamura/c4/db/repository" "github.com/ryanhamamura/games/db/repository"
"github.com/ryanhamamura/c4/snake" "github.com/ryanhamamura/games/snake"
"github.com/alexedwards/scs/v2" "github.com/alexedwards/scs/v2"
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"

View File

@@ -3,7 +3,7 @@ package components
import ( import (
"fmt" "fmt"
"github.com/ryanhamamura/c4/snake" "github.com/ryanhamamura/games/snake"
) )
func cellSizeForGrid(width, height int) int { func cellSizeForGrid(width, height int) int {

View File

@@ -5,8 +5,8 @@ import (
"math" "math"
"time" "time"
"github.com/ryanhamamura/c4/config" "github.com/ryanhamamura/games/config"
"github.com/ryanhamamura/c4/snake" "github.com/ryanhamamura/games/snake"
"github.com/starfederation/datastar-go/datastar" "github.com/starfederation/datastar-go/datastar"
) )

View File

@@ -10,12 +10,12 @@ import (
"github.com/nats-io/nats.go" "github.com/nats-io/nats.go"
"github.com/starfederation/datastar-go/datastar" "github.com/starfederation/datastar-go/datastar"
"github.com/ryanhamamura/c4/chat" "github.com/ryanhamamura/games/chat"
chatcomponents "github.com/ryanhamamura/c4/chat/components" chatcomponents "github.com/ryanhamamura/games/chat/components"
"github.com/ryanhamamura/c4/features/snakegame/components" "github.com/ryanhamamura/games/features/snakegame/components"
"github.com/ryanhamamura/c4/features/snakegame/pages" "github.com/ryanhamamura/games/features/snakegame/pages"
"github.com/ryanhamamura/c4/sessions" "github.com/ryanhamamura/games/sessions"
"github.com/ryanhamamura/c4/snake" "github.com/ryanhamamura/games/snake"
) )
func snakeChatColor(slot int) string { func snakeChatColor(slot int) string {

View File

@@ -3,12 +3,12 @@ package pages
import ( import (
"fmt" "fmt"
"github.com/ryanhamamura/c4/chat" "github.com/ryanhamamura/games/chat"
chatcomponents "github.com/ryanhamamura/c4/chat/components" chatcomponents "github.com/ryanhamamura/games/chat/components"
"github.com/ryanhamamura/c4/features/common/components" "github.com/ryanhamamura/games/features/common/components"
"github.com/ryanhamamura/c4/features/common/layouts" "github.com/ryanhamamura/games/features/common/layouts"
snakecomponents "github.com/ryanhamamura/c4/features/snakegame/components" snakecomponents "github.com/ryanhamamura/games/features/snakegame/components"
"github.com/ryanhamamura/c4/snake" "github.com/ryanhamamura/games/snake"
"github.com/starfederation/datastar-go/datastar" "github.com/starfederation/datastar-go/datastar"
) )

View File

@@ -6,7 +6,7 @@ import (
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"
"github.com/nats-io/nats.go" "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) { func SetupRoutes(router chi.Router, snakeStore *snake.SnakeStore, nc *nats.Conn, sessions *scs.SessionManager) {

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/ryanhamamura/c4 module github.com/ryanhamamura/games
go 1.25.4 go 1.25.4

View File

@@ -6,7 +6,7 @@ import (
stdlog "log" stdlog "log"
"os" "os"
"github.com/ryanhamamura/c4/config" "github.com/ryanhamamura/games/config"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"

View File

@@ -5,7 +5,7 @@ import (
"net/http" "net/http"
"time" "time"
"github.com/ryanhamamura/c4/config" "github.com/ryanhamamura/games/config"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"

18
main.go
View File

@@ -11,15 +11,15 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/ryanhamamura/c4/config" "github.com/ryanhamamura/games/config"
"github.com/ryanhamamura/c4/connect4" "github.com/ryanhamamura/games/connect4"
"github.com/ryanhamamura/c4/db" "github.com/ryanhamamura/games/db"
"github.com/ryanhamamura/c4/db/repository" "github.com/ryanhamamura/games/db/repository"
"github.com/ryanhamamura/c4/logging" "github.com/ryanhamamura/games/logging"
appnats "github.com/ryanhamamura/c4/nats" appnats "github.com/ryanhamamura/games/nats"
"github.com/ryanhamamura/c4/router" "github.com/ryanhamamura/games/router"
"github.com/ryanhamamura/c4/sessions" "github.com/ryanhamamura/games/sessions"
"github.com/ryanhamamura/c4/snake" "github.com/ryanhamamura/games/snake"
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware" "github.com/go-chi/chi/v5/middleware"

View File

@@ -7,14 +7,14 @@ import (
"net/http" "net/http"
"sync" "sync"
"github.com/ryanhamamura/c4/config" "github.com/ryanhamamura/games/config"
"github.com/ryanhamamura/c4/connect4" "github.com/ryanhamamura/games/connect4"
"github.com/ryanhamamura/c4/db/repository" "github.com/ryanhamamura/games/db/repository"
"github.com/ryanhamamura/c4/features/auth" "github.com/ryanhamamura/games/features/auth"
"github.com/ryanhamamura/c4/features/c4game" "github.com/ryanhamamura/games/features/c4game"
"github.com/ryanhamamura/c4/features/lobby" "github.com/ryanhamamura/games/features/lobby"
"github.com/ryanhamamura/c4/features/snakegame" "github.com/ryanhamamura/games/features/snakegame"
"github.com/ryanhamamura/c4/snake" "github.com/ryanhamamura/games/snake"
"github.com/alexedwards/scs/v2" "github.com/alexedwards/scs/v2"
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"

View File

@@ -8,7 +8,7 @@ import (
"net/http" "net/http"
"time" "time"
"github.com/ryanhamamura/c4/player" "github.com/ryanhamamura/games/player"
"github.com/alexedwards/scs/sqlite3store" "github.com/alexedwards/scs/sqlite3store"
"github.com/alexedwards/scs/v2" "github.com/alexedwards/scs/v2"

View File

@@ -3,8 +3,8 @@ package snake
import ( import (
"context" "context"
"github.com/ryanhamamura/c4/db/repository" "github.com/ryanhamamura/games/db/repository"
"github.com/ryanhamamura/c4/player" "github.com/ryanhamamura/games/player"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
) )

View File

@@ -4,8 +4,8 @@ import (
"context" "context"
"sync" "sync"
"github.com/ryanhamamura/c4/db/repository" "github.com/ryanhamamura/games/db/repository"
"github.com/ryanhamamura/c4/player" "github.com/ryanhamamura/games/player"
) )
type SnakeStore struct { type SnakeStore struct {

View File

@@ -4,7 +4,7 @@ import (
"encoding/json" "encoding/json"
"time" "time"
"github.com/ryanhamamura/c4/player" "github.com/ryanhamamura/games/player"
) )
type Direction int type Direction int

View File

@@ -8,8 +8,8 @@ import (
"io/fs" "io/fs"
"testing" "testing"
"github.com/ryanhamamura/c4/db" "github.com/ryanhamamura/games/db"
"github.com/ryanhamamura/c4/db/repository" "github.com/ryanhamamura/games/db/repository"
"github.com/pressly/goose/v3" "github.com/pressly/goose/v3"
_ "modernc.org/sqlite" _ "modernc.org/sqlite"