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
@@ -14,8 +14,8 @@ import (
"github.com/hibiken/asynq"
"github.com/Rain-kl/Wavelet/core"
"github.com/Rain-kl/Wavelet/plugins/drivers/driver_asynq_worker"
"Wavelet/core"
"Wavelet/plugins/drivers/driver_asynq_worker"
)
//go:embed migrations/*.sql
@@ -7,7 +7,7 @@ import (
"context"
"time"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
db "Wavelet/plugins/infra/database"
)
// Schedule 定时任务配置表
@@ -13,8 +13,8 @@ import (
"github.com/hibiken/asynq"
"github.com/Rain-kl/Wavelet/pkg/logger"
"github.com/Rain-kl/Wavelet/plugins/drivers/driver_asynq_worker"
"Wavelet/pkg/logger"
"Wavelet/plugins/drivers/driver_asynq_worker"
)
var (
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
@@ -19,10 +18,10 @@ import (
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/trace"
"github.com/Rain-kl/Wavelet/pkg/idgen"
"github.com/Rain-kl/Wavelet/pkg/logger"
otel_trace "github.com/Rain-kl/Wavelet/pkg/trace"
"github.com/Rain-kl/Wavelet/pkg/util"
"Wavelet/pkg/idgen"
"Wavelet/pkg/logger"
otel_trace "Wavelet/pkg/trace"
"Wavelet/pkg/util"
)
var (
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
@@ -18,7 +17,7 @@ import (
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/trace"
"github.com/Rain-kl/Wavelet/pkg/testhelper"
"Wavelet/pkg/testhelper"
)
// mockHandler 用于测试的模拟任务处理器
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
@@ -14,7 +14,7 @@ import (
"github.com/hibiken/asynq"
"github.com/Rain-kl/Wavelet/core"
"Wavelet/core"
)
const (
@@ -12,9 +12,9 @@ import (
"github.com/redis/go-redis/v9"
"github.com/Rain-kl/Wavelet/pkg/idgen"
cachepkg "github.com/Rain-kl/Wavelet/plugins/infra/cache"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
"Wavelet/pkg/idgen"
cachepkg "Wavelet/plugins/infra/cache"
db "Wavelet/plugins/infra/database"
)
const (
@@ -10,7 +10,7 @@ import (
"gorm.io/gorm"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
db "Wavelet/plugins/infra/database"
)
// TaskExecutionStatus 任务执行状态
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
@@ -9,7 +8,7 @@ import (
"github.com/redis/go-redis/v9"
"github.com/redis/go-redis/v9/maintnotifications"
"github.com/Rain-kl/Wavelet/pkg/config"
"Wavelet/pkg/config"
)
type redisClientConnOpt struct {
@@ -6,7 +6,7 @@ package driver_asynq_worker
import (
"testing"
"github.com/Rain-kl/Wavelet/pkg/config"
"Wavelet/pkg/config"
"github.com/redis/go-redis/v9/maintnotifications"
)
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
@@ -16,11 +15,11 @@ import (
"syscall"
"time"
"github.com/Rain-kl/Wavelet/pkg/config"
"github.com/Rain-kl/Wavelet/pkg/trace"
"github.com/Rain-kl/Wavelet/pkg/util"
"github.com/Rain-kl/Wavelet/plugins/domain/auth"
"github.com/Rain-kl/Wavelet/plugins/domain/risk_control"
"Wavelet/pkg/config"
"Wavelet/pkg/trace"
"Wavelet/pkg/util"
"Wavelet/plugins/domain/auth"
"Wavelet/plugins/domain/risk_control"
"github.com/gin-contrib/sessions"
"github.com/gin-contrib/sessions/redis"
"github.com/gin-gonic/gin"
@@ -1,4 +1,3 @@
// Copyright 2025 linux.do
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
@@ -12,11 +11,11 @@ import (
"strings"
"time"
"github.com/Rain-kl/Wavelet/pkg/config"
"github.com/Rain-kl/Wavelet/pkg/logger"
"github.com/Rain-kl/Wavelet/pkg/response"
otel_trace "github.com/Rain-kl/Wavelet/pkg/trace"
database "github.com/Rain-kl/Wavelet/plugins/infra/database"
"Wavelet/pkg/config"
"Wavelet/pkg/logger"
"Wavelet/pkg/response"
otel_trace "Wavelet/pkg/trace"
database "Wavelet/plugins/infra/database"
"github.com/gin-gonic/gin"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/trace"
@@ -8,7 +8,7 @@ import (
"net/http/httptest"
"testing"
"github.com/Rain-kl/Wavelet/pkg/testhelper"
"Wavelet/pkg/testhelper"
"github.com/gin-gonic/gin"
)
@@ -15,8 +15,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/Rain-kl/Wavelet/core"
"github.com/Rain-kl/Wavelet/pkg/util"
"Wavelet/core"
"Wavelet/pkg/util"
)
const (
+5 -5
View File
@@ -20,11 +20,11 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/Rain-kl/Wavelet/core"
"github.com/Rain-kl/Wavelet/core/extpoints"
"github.com/Rain-kl/Wavelet/plugins/drivers/driver_asynq_cron"
"github.com/Rain-kl/Wavelet/plugins/drivers/driver_asynq_worker"
"github.com/Rain-kl/Wavelet/plugins/drivers/driver_http"
"Wavelet/core"
"Wavelet/core/extpoints"
"Wavelet/plugins/drivers/driver_asynq_cron"
"Wavelet/plugins/drivers/driver_asynq_worker"
"Wavelet/plugins/drivers/driver_http"
)
func init() {