From 188a05caa71097f597115406a689d8836a8e621e Mon Sep 17 00:00:00 2001 From: lan Date: Tue, 2 Dec 2025 18:41:34 +0800 Subject: [PATCH] chore: Clean up code by removing trailing whitespace in multiple files --- .dockerignore | 1 + Dockerfile | 1 + internal/handler/captcha_handler_di.go | 1 + internal/handler/profile_handler_di.go | 1 + internal/handler/texture_handler_di.go | 1 + internal/repository/interfaces.go | 1 + internal/repository/profile_repository_impl.go | 1 + internal/repository/system_config_repository_impl.go | 1 + internal/repository/texture_repository_impl.go | 1 + internal/repository/token_repository_impl.go | 1 + internal/repository/user_repository_impl.go | 1 + internal/service/interfaces.go | 1 + internal/service/profile_service_impl.go | 1 + internal/service/texture_service_impl.go | 1 - internal/service/token_service_impl.go | 1 - 15 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 6686339..b5e12a9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -76,3 +76,4 @@ minio-data/ + diff --git a/Dockerfile b/Dockerfile index b5a00ab..cebe971 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,3 +61,4 @@ ENTRYPOINT ["./server"] + diff --git a/internal/handler/captcha_handler_di.go b/internal/handler/captcha_handler_di.go index 8078aee..f9849d0 100644 --- a/internal/handler/captcha_handler_di.go +++ b/internal/handler/captcha_handler_di.go @@ -106,3 +106,4 @@ func (h *CaptchaHandler) Verify(c *gin.Context) { } } + diff --git a/internal/handler/profile_handler_di.go b/internal/handler/profile_handler_di.go index d9d8e3b..6fdbeb9 100644 --- a/internal/handler/profile_handler_di.go +++ b/internal/handler/profile_handler_di.go @@ -244,3 +244,4 @@ func (h *ProfileHandler) SetActive(c *gin.Context) { RespondSuccess(c, gin.H{"message": "设置成功"}) } + diff --git a/internal/handler/texture_handler_di.go b/internal/handler/texture_handler_di.go index 8233184..26bd558 100644 --- a/internal/handler/texture_handler_di.go +++ b/internal/handler/texture_handler_di.go @@ -282,3 +282,4 @@ func (h *TextureHandler) GetUserFavorites(c *gin.Context) { c.JSON(200, model.NewPaginationResponse(TexturesToTextureInfos(textures), total, page, pageSize)) } + diff --git a/internal/repository/interfaces.go b/internal/repository/interfaces.go index 8fabb7c..f72ca88 100644 --- a/internal/repository/interfaces.go +++ b/internal/repository/interfaces.go @@ -82,3 +82,4 @@ type YggdrasilRepository interface { GetPasswordByID(id int64) (string, error) ResetPassword(id int64, password string) error } + diff --git a/internal/repository/profile_repository_impl.go b/internal/repository/profile_repository_impl.go index 5eb4e9e..ebe3fdb 100644 --- a/internal/repository/profile_repository_impl.go +++ b/internal/repository/profile_repository_impl.go @@ -146,3 +146,4 @@ func (r *profileRepositoryImpl) UpdateKeyPair(profileId string, keyPair *model.K return nil }) } + diff --git a/internal/repository/system_config_repository_impl.go b/internal/repository/system_config_repository_impl.go index 2bb5844..4ba261f 100644 --- a/internal/repository/system_config_repository_impl.go +++ b/internal/repository/system_config_repository_impl.go @@ -42,3 +42,4 @@ func (r *systemConfigRepositoryImpl) UpdateValue(key, value string) error { return r.db.Model(&model.SystemConfig{}).Where("key = ?", key).Update("value", value).Error } + diff --git a/internal/repository/texture_repository_impl.go b/internal/repository/texture_repository_impl.go index 82f37df..c6a2971 100644 --- a/internal/repository/texture_repository_impl.go +++ b/internal/repository/texture_repository_impl.go @@ -172,3 +172,4 @@ func (r *textureRepositoryImpl) CountByUploaderID(uploaderID int64) (int64, erro Count(&count).Error return count, err } + diff --git a/internal/repository/token_repository_impl.go b/internal/repository/token_repository_impl.go index 623f06a..e4c94e1 100644 --- a/internal/repository/token_repository_impl.go +++ b/internal/repository/token_repository_impl.go @@ -68,3 +68,4 @@ func (r *tokenRepositoryImpl) BatchDelete(accessTokens []string) (int64, error) result := r.db.Where("access_token IN ?", accessTokens).Delete(&model.Token{}) return result.RowsAffected, result.Error } + diff --git a/internal/repository/user_repository_impl.go b/internal/repository/user_repository_impl.go index b932ae7..57ec4c8 100644 --- a/internal/repository/user_repository_impl.go +++ b/internal/repository/user_repository_impl.go @@ -100,3 +100,4 @@ func handleNotFoundResult[T any](result *T, err error) (*T, error) { } return result, nil } + diff --git a/internal/service/interfaces.go b/internal/service/interfaces.go index 55a9f1d..82f8507 100644 --- a/internal/service/interfaces.go +++ b/internal/service/interfaces.go @@ -142,3 +142,4 @@ type ServiceDeps struct { Storage *storage.StorageClient } + diff --git a/internal/service/profile_service_impl.go b/internal/service/profile_service_impl.go index a84dcad..a956793 100644 --- a/internal/service/profile_service_impl.go +++ b/internal/service/profile_service_impl.go @@ -231,3 +231,4 @@ func generateRSAPrivateKeyInternal() (string, error) { return string(privateKeyPEM), nil } + diff --git a/internal/service/texture_service_impl.go b/internal/service/texture_service_impl.go index 9a82ac8..eb19a82 100644 --- a/internal/service/texture_service_impl.go +++ b/internal/service/texture_service_impl.go @@ -213,4 +213,3 @@ func parseTextureTypeInternal(textureType string) (model.TextureType, error) { return "", errors.New("无效的材质类型") } } - diff --git a/internal/service/token_service_impl.go b/internal/service/token_service_impl.go index 8d49910..b128abf 100644 --- a/internal/service/token_service_impl.go +++ b/internal/service/token_service_impl.go @@ -275,4 +275,3 @@ func (s *tokenServiceImpl) validateProfileByUserID(userID int64, UUID string) (b } return profile.UserID == userID, nil } -