refactor(module): simplify module name to Wavelet and standardize import paths

- Declared module Wavelet in backend/go.mod
- Replaced github.com/Rain-kl/Wavelet/ with clean Wavelet/ import paths across backend codebase
- Updated architecture guards, Makefile, swagger, and build tests
- 100% passed all tests, lint checks, and binary compilation
This commit is contained in:
ryan
2026-08-28 13:10:30 +08:00
parent f2ab94501c
commit 9f8890d159
201 changed files with 539 additions and 620 deletions
+2 -3
View File
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
@@ -8,8 +7,8 @@ import (
"context"
"encoding/json"
"github.com/Rain-kl/Wavelet/core/contracts"
"github.com/Rain-kl/Wavelet/pkg/logger"
"Wavelet/core/contracts"
"Wavelet/pkg/logger"
"github.com/gin-gonic/gin"
)
@@ -10,8 +10,8 @@ import (
"strconv"
"strings"
"github.com/Rain-kl/Wavelet/core/contracts"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
"Wavelet/core/contracts"
db "Wavelet/plugins/infra/database"
"github.com/coreos/go-oidc/v3/oidc"
"golang.org/x/oauth2"
+4 -4
View File
@@ -10,10 +10,10 @@ import (
"sync"
"time"
"github.com/Rain-kl/Wavelet/core/contracts"
"github.com/Rain-kl/Wavelet/pkg/cache/ram"
"github.com/Rain-kl/Wavelet/pkg/util"
db "github.com/Rain-kl/Wavelet/plugins/infra/cache"
"Wavelet/core/contracts"
"Wavelet/pkg/cache/ram"
"Wavelet/pkg/util"
db "Wavelet/plugins/infra/cache"
)
const (
+3 -3
View File
@@ -11,9 +11,9 @@ import (
"github.com/redis/go-redis/v9"
"github.com/redis/go-redis/v9/maintnotifications"
"github.com/Rain-kl/Wavelet/core/contracts"
"github.com/Rain-kl/Wavelet/plugins/domain/auth"
db "github.com/Rain-kl/Wavelet/plugins/infra/cache"
"Wavelet/core/contracts"
"Wavelet/plugins/domain/auth"
db "Wavelet/plugins/infra/cache"
)
func setupOauthCacheTest(t *testing.T) (*miniredis.Miniredis, func()) {
-1
View File
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
-1
View File
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
+7 -8
View File
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
@@ -13,14 +12,14 @@ import (
"strings"
"time"
"github.com/Rain-kl/Wavelet/core/contracts"
"Wavelet/core/contracts"
"github.com/Rain-kl/Wavelet/pkg/idgen"
"github.com/Rain-kl/Wavelet/pkg/logger"
"github.com/Rain-kl/Wavelet/pkg/response"
"github.com/Rain-kl/Wavelet/pkg/util"
cachepkg "github.com/Rain-kl/Wavelet/plugins/infra/cache"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
"Wavelet/pkg/idgen"
"Wavelet/pkg/logger"
"Wavelet/pkg/response"
"Wavelet/pkg/util"
cachepkg "Wavelet/plugins/infra/cache"
db "Wavelet/plugins/infra/database"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/gin-contrib/sessions"
"github.com/gin-gonic/gin"
+5 -6
View File
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
@@ -10,11 +9,11 @@ import (
"encoding/hex"
"errors"
"github.com/Rain-kl/Wavelet/core/contracts"
"github.com/Rain-kl/Wavelet/pkg/response"
"github.com/Rain-kl/Wavelet/pkg/trace"
"github.com/Rain-kl/Wavelet/pkg/util"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
"Wavelet/core/contracts"
"Wavelet/pkg/response"
"Wavelet/pkg/trace"
"Wavelet/pkg/util"
db "Wavelet/plugins/infra/database"
"github.com/gin-gonic/gin"
)
+1 -2
View File
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
@@ -12,7 +11,7 @@ import (
"strings"
"time"
"github.com/Rain-kl/Wavelet/core/contracts"
"Wavelet/core/contracts"
)
var authSourceNamePattern = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9_-]{0,79}$`)
+3 -3
View File
@@ -7,9 +7,9 @@ package auth
import (
"embed"
"github.com/Rain-kl/Wavelet/core"
"github.com/Rain-kl/Wavelet/core/contracts"
"github.com/Rain-kl/Wavelet/core/extpoints"
"Wavelet/core"
"Wavelet/core/contracts"
"Wavelet/core/extpoints"
)
//go:embed migrations/*.sql
+4 -4
View File
@@ -16,10 +16,10 @@ import (
"github.com/stretchr/testify/require"
"gorm.io/gorm"
"github.com/Rain-kl/Wavelet/core"
"github.com/Rain-kl/Wavelet/core/contracts"
"github.com/Rain-kl/Wavelet/plugins/domain/auth"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
"Wavelet/core"
"Wavelet/core/contracts"
"Wavelet/plugins/domain/auth"
db "Wavelet/plugins/infra/database"
)
type testUser struct {
+1 -2
View File
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
@@ -7,7 +6,7 @@ package auth
import (
"context"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
db "Wavelet/plugins/infra/database"
)
// GetAuthSourceByID 根据 ID 获取认证源
+3 -3
View File
@@ -8,9 +8,9 @@ import (
"errors"
"sync"
"github.com/Rain-kl/Wavelet/core/contracts"
"github.com/Rain-kl/Wavelet/pkg/util"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
"Wavelet/core/contracts"
"Wavelet/pkg/util"
db "Wavelet/plugins/infra/database"
"github.com/gin-gonic/gin"
)
+3 -3
View File
@@ -11,9 +11,9 @@ import (
"strconv"
"strings"
"github.com/Rain-kl/Wavelet/core/contracts"
"github.com/Rain-kl/Wavelet/pkg/config"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
"Wavelet/core/contracts"
"Wavelet/pkg/config"
db "Wavelet/plugins/infra/database"
"github.com/gin-contrib/sessions"
"github.com/gin-gonic/gin"
"github.com/google/uuid"