diff --git a/Makefile b/Makefile index 31508e9..4bae07d 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ test: go test ./... migrate: - sqlite3 malago.db < migrations/001_init.sql + sqlite3 mal.db < migrations/001_init.sql sqlc: sqlc generate diff --git a/cmd/create-user/main.go b/cmd/create-user/main.go index 53d6165..54ea94d 100644 --- a/cmd/create-user/main.go +++ b/cmd/create-user/main.go @@ -10,8 +10,8 @@ import ( _ "github.com/mattn/go-sqlite3" - "malago/internal/database" - "malago/internal/features/auth" + "mal/internal/database" + "mal/internal/features/auth" ) func main() { @@ -27,7 +27,7 @@ func main() { dbFile := os.Getenv("DATABASE_FILE") if dbFile == "" { - dbFile = "malago.db" + dbFile = "mal.db" } db, err := sql.Open("sqlite3", dbFile) diff --git a/cmd/server/main.go b/cmd/server/main.go index 72a7096..f052b7f 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -8,17 +8,17 @@ import ( _ "github.com/mattn/go-sqlite3" - "malago/internal/database" - "malago/internal/features/auth" - "malago/internal/jikan" - "malago/internal/server" + "mal/internal/database" + "mal/internal/features/auth" + "mal/internal/jikan" + "mal/internal/server" ) func main() { dbFile := os.Getenv("DATABASE_FILE") if dbFile == "" { - dbFile = "malago.db" + dbFile = "mal.db" } db, err := sql.Open("sqlite3", dbFile) diff --git a/go.mod b/go.mod index a4e9dbc..d829a25 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module malago +module mal go 1.24.0 diff --git a/internal/features/anime/handler.go b/internal/features/anime/handler.go index 7d03440..9182d80 100644 --- a/internal/features/anime/handler.go +++ b/internal/features/anime/handler.go @@ -6,9 +6,9 @@ import ( "net/http" "strconv" - "malago/internal/database" - "malago/internal/shared/middleware" - "malago/internal/templates" + "mal/internal/database" + "mal/internal/shared/middleware" + "mal/internal/templates" ) type Handler struct { diff --git a/internal/features/anime/service.go b/internal/features/anime/service.go index 183cb35..e53d997 100644 --- a/internal/features/anime/service.go +++ b/internal/features/anime/service.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "malago/internal/database" - "malago/internal/jikan" + "mal/internal/database" + "mal/internal/jikan" ) type Service struct { diff --git a/internal/features/auth/auth.go b/internal/features/auth/auth.go index 17baa95..e4df188 100644 --- a/internal/features/auth/auth.go +++ b/internal/features/auth/auth.go @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "golang.org/x/crypto/bcrypt" - "malago/internal/database" + "mal/internal/database" ) var ( diff --git a/internal/features/auth/handler.go b/internal/features/auth/handler.go index c2fc57a..538ffc2 100644 --- a/internal/features/auth/handler.go +++ b/internal/features/auth/handler.go @@ -3,7 +3,7 @@ package auth import ( "net/http" - "malago/internal/templates" + "mal/internal/templates" ) type Handler struct { diff --git a/internal/features/watchlist/handler.go b/internal/features/watchlist/handler.go index 4da97ce..aeba34f 100644 --- a/internal/features/watchlist/handler.go +++ b/internal/features/watchlist/handler.go @@ -7,9 +7,9 @@ import ( "net/http" "strconv" - "malago/internal/database" - "malago/internal/shared/middleware" - "malago/internal/templates" + "mal/internal/database" + "mal/internal/shared/middleware" + "mal/internal/templates" ) type Handler struct { @@ -198,7 +198,7 @@ func (h *Handler) HandleExportWatchlist(w http.ResponseWriter, r *http.Request) } w.Header().Set("Content-Type", "application/json") - w.Header().Set("Content-Disposition", "attachment; filename=malago-watchlist.json") + w.Header().Set("Content-Disposition", "attachment; filename=mal-watchlist.json") json.NewEncoder(w).Encode(export) } diff --git a/internal/features/watchlist/service.go b/internal/features/watchlist/service.go index 428d25a..b15f38b 100644 --- a/internal/features/watchlist/service.go +++ b/internal/features/watchlist/service.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" - "malago/internal/database" + "mal/internal/database" ) type Service struct { diff --git a/internal/server/routes.go b/internal/server/routes.go index 2382118..d7adfa1 100644 --- a/internal/server/routes.go +++ b/internal/server/routes.go @@ -3,12 +3,12 @@ package server import ( "net/http" - "malago/internal/database" - "malago/internal/features/anime" - "malago/internal/features/auth" - "malago/internal/features/watchlist" - "malago/internal/jikan" - "malago/internal/shared/middleware" + "mal/internal/database" + "mal/internal/features/anime" + "mal/internal/features/auth" + "mal/internal/features/watchlist" + "mal/internal/jikan" + "mal/internal/shared/middleware" ) type Config struct { diff --git a/internal/shared/middleware/auth.go b/internal/shared/middleware/auth.go index f57d097..9b7c5ad 100644 --- a/internal/shared/middleware/auth.go +++ b/internal/shared/middleware/auth.go @@ -5,8 +5,8 @@ import ( "net/http" "strings" - "malago/internal/database" - "malago/internal/features/auth" + "mal/internal/database" + "mal/internal/features/auth" ) type contextKey string diff --git a/internal/templates/anime.templ b/internal/templates/anime.templ index 1165756..36c6057 100644 --- a/internal/templates/anime.templ +++ b/internal/templates/anime.templ @@ -1,11 +1,11 @@ package templates -import "malago/internal/jikan" +import "mal/internal/jikan" import "fmt" import "strings" templ AnimeDetails(anime jikan.Anime, currentStatus string) { - @Layout("malago - " + anime.DisplayTitle()) { + @Layout("mal - " + anime.DisplayTitle()) {
diff --git a/internal/templates/anime_templ.go b/internal/templates/anime_templ.go index 7c977d5..2068bdf 100644 --- a/internal/templates/anime_templ.go +++ b/internal/templates/anime_templ.go @@ -8,7 +8,7 @@ package templates import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -import "malago/internal/jikan" +import "mal/internal/jikan" import "fmt" import "strings" @@ -599,7 +599,7 @@ func AnimeDetails(anime jikan.Anime, currentStatus string) templ.Component { } return nil }) - templ_7745c5c3_Err = Layout("malago - "+anime.DisplayTitle()).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = Layout("mal - "+anime.DisplayTitle()).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/internal/templates/catalog.templ b/internal/templates/catalog.templ index c9c8409..524881a 100644 --- a/internal/templates/catalog.templ +++ b/internal/templates/catalog.templ @@ -1,10 +1,10 @@ package templates -import "malago/internal/jikan" +import "mal/internal/jikan" import "fmt" templ Catalog() { - @Layout("malago - catalog") { + @Layout("mal - catalog") {
diff --git a/internal/templates/catalog_templ.go b/internal/templates/catalog_templ.go index 7242bb7..f1743e6 100644 --- a/internal/templates/catalog_templ.go +++ b/internal/templates/catalog_templ.go @@ -8,7 +8,7 @@ package templates import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -import "malago/internal/jikan" +import "mal/internal/jikan" import "fmt" func Catalog() templ.Component { @@ -50,7 +50,7 @@ func Catalog() templ.Component { } return nil }) - templ_7745c5c3_Err = Layout("malago - catalog").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = Layout("mal - catalog").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/internal/templates/index.templ b/internal/templates/index.templ index 1bef404..342bdde 100644 --- a/internal/templates/index.templ +++ b/internal/templates/index.templ @@ -1,13 +1,13 @@ package templates import ( - "malago/internal/jikan" + "mal/internal/jikan" "fmt" "net/url" ) templ Search(q string) { - @Layout("malago - search") { + @Layout("mal - search") { if q != "" {
diff --git a/internal/templates/index_templ.go b/internal/templates/index_templ.go index 9f0ad6e..8608ecd 100644 --- a/internal/templates/index_templ.go +++ b/internal/templates/index_templ.go @@ -10,7 +10,7 @@ import templruntime "github.com/a-h/templ/runtime" import ( "fmt" - "malago/internal/jikan" + "mal/internal/jikan" "net/url" ) @@ -73,7 +73,7 @@ func Search(q string) templ.Component { } return nil }) - templ_7745c5c3_Err = Layout("malago - search").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = Layout("mal - search").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/internal/templates/layout.templ b/internal/templates/layout.templ index e247768..81e9013 100644 --- a/internal/templates/layout.templ +++ b/internal/templates/layout.templ @@ -14,7 +14,7 @@ templ Layout(title string) {
- +