From 172fd0a35de54bee89b47062853516257600ba05 Mon Sep 17 00:00:00 2001 From: Leon <147289645+LeoninCS@users.noreply.github.com> Date: Tue, 9 Dec 2025 13:29:00 +0800 Subject: [PATCH] refactor(video): prefix core files with video_ --- internal/account/handler.go | 8 +++----- internal/video/{entity.go => video_entity.go} | 0 internal/video/{handler.go => video_handler.go} | 0 internal/video/{repo.go => video_repo.go} | 0 internal/video/{service.go => video_service.go} | 0 5 files changed, 3 insertions(+), 5 deletions(-) rename internal/video/{entity.go => video_entity.go} (100%) rename internal/video/{handler.go => video_handler.go} (100%) rename internal/video/{repo.go => video_repo.go} (100%) rename internal/video/{service.go => video_service.go} (100%) diff --git a/internal/account/handler.go b/internal/account/handler.go index 7f4f1aa..ff768df 100644 --- a/internal/account/handler.go +++ b/internal/account/handler.go @@ -1,13 +1,11 @@ package account import ( - "feedsystem_video_go/internal/account" - "github.com/gin-gonic/gin" ) type AccountHandler struct { - accountService *account.AccountService + accountService *AccountService } type CreateAccountRequest struct { @@ -66,7 +64,7 @@ type LogoutRequest struct { type LogoutResponse struct { } -func NewAccountHandler(accountService *account.AccountService) *AccountHandler { +func NewAccountHandler(accountService *AccountService) *AccountHandler { return &AccountHandler{accountService: accountService} } func (h *AccountHandler) CreateAccount(c *gin.Context) { @@ -75,7 +73,7 @@ func (h *AccountHandler) CreateAccount(c *gin.Context) { c.JSON(400, gin.H{"error": err.Error()}) return } - if err := h.accountService.CreateAccount(&account.Account{ + if err := h.accountService.CreateAccount(&Account{ Username: req.Username, Password: req.Password, }); err != nil { diff --git a/internal/video/entity.go b/internal/video/video_entity.go similarity index 100% rename from internal/video/entity.go rename to internal/video/video_entity.go diff --git a/internal/video/handler.go b/internal/video/video_handler.go similarity index 100% rename from internal/video/handler.go rename to internal/video/video_handler.go diff --git a/internal/video/repo.go b/internal/video/video_repo.go similarity index 100% rename from internal/video/repo.go rename to internal/video/video_repo.go diff --git a/internal/video/service.go b/internal/video/video_service.go similarity index 100% rename from internal/video/service.go rename to internal/video/video_service.go