refactor(layout): relocate go.mod to backend/ and clean import paths to module root

- Relocated go.mod and go.sum into backend/ root directory
- Stripped redundant backend/ segments from all Go imports (github.com/Rain-kl/Wavelet/...)
- Unified Makefile, swagger, and build-test to execute in backend/ module context
- Ensured 100% build-test, code-check, format, and swagger pass
This commit is contained in:
ryan
2026-08-28 13:01:51 +08:00
parent 43dc97e48c
commit f2ab94501c
185 changed files with 557 additions and 557 deletions
@@ -14,8 +14,8 @@ import (
"github.com/hibiken/asynq"
"github.com/Rain-kl/Wavelet/backend/core"
"github.com/Rain-kl/Wavelet/backend/plugins/drivers/driver_asynq_worker"
"github.com/Rain-kl/Wavelet/core"
"github.com/Rain-kl/Wavelet/plugins/drivers/driver_asynq_worker"
)
//go:embed migrations/*.sql
@@ -7,7 +7,7 @@ import (
"context"
"time"
db "github.com/Rain-kl/Wavelet/backend/plugins/infra/database"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
)
// Schedule 定时任务配置表
@@ -13,8 +13,8 @@ import (
"github.com/hibiken/asynq"
"github.com/Rain-kl/Wavelet/backend/pkg/logger"
"github.com/Rain-kl/Wavelet/backend/plugins/drivers/driver_asynq_worker"
"github.com/Rain-kl/Wavelet/pkg/logger"
"github.com/Rain-kl/Wavelet/plugins/drivers/driver_asynq_worker"
)
var (
@@ -19,10 +19,10 @@ import (
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/trace"
"github.com/Rain-kl/Wavelet/backend/pkg/idgen"
"github.com/Rain-kl/Wavelet/backend/pkg/logger"
otel_trace "github.com/Rain-kl/Wavelet/backend/pkg/trace"
"github.com/Rain-kl/Wavelet/backend/pkg/util"
"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"
)
var (
@@ -18,7 +18,7 @@ import (
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/trace"
"github.com/Rain-kl/Wavelet/backend/pkg/testhelper"
"github.com/Rain-kl/Wavelet/pkg/testhelper"
)
// mockHandler 用于测试的模拟任务处理器
@@ -14,7 +14,7 @@ import (
"github.com/hibiken/asynq"
"github.com/Rain-kl/Wavelet/backend/core"
"github.com/Rain-kl/Wavelet/core"
)
const (
@@ -12,9 +12,9 @@ import (
"github.com/redis/go-redis/v9"
"github.com/Rain-kl/Wavelet/backend/pkg/idgen"
cachepkg "github.com/Rain-kl/Wavelet/backend/plugins/infra/cache"
db "github.com/Rain-kl/Wavelet/backend/plugins/infra/database"
"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"
)
const (
@@ -10,7 +10,7 @@ import (
"gorm.io/gorm"
db "github.com/Rain-kl/Wavelet/backend/plugins/infra/database"
db "github.com/Rain-kl/Wavelet/plugins/infra/database"
)
// TaskExecutionStatus 任务执行状态
@@ -9,7 +9,7 @@ import (
"github.com/redis/go-redis/v9"
"github.com/redis/go-redis/v9/maintnotifications"
"github.com/Rain-kl/Wavelet/backend/pkg/config"
"github.com/Rain-kl/Wavelet/pkg/config"
)
type redisClientConnOpt struct {
@@ -6,7 +6,7 @@ package driver_asynq_worker
import (
"testing"
"github.com/Rain-kl/Wavelet/backend/pkg/config"
"github.com/Rain-kl/Wavelet/pkg/config"
"github.com/redis/go-redis/v9/maintnotifications"
)
@@ -16,11 +16,11 @@ import (
"syscall"
"time"
"github.com/Rain-kl/Wavelet/backend/pkg/config"
"github.com/Rain-kl/Wavelet/backend/pkg/trace"
"github.com/Rain-kl/Wavelet/backend/pkg/util"
"github.com/Rain-kl/Wavelet/backend/plugins/domain/auth"
"github.com/Rain-kl/Wavelet/backend/plugins/domain/risk_control"
"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"
"github.com/gin-contrib/sessions"
"github.com/gin-contrib/sessions/redis"
"github.com/gin-gonic/gin"
@@ -12,11 +12,11 @@ import (
"strings"
"time"
"github.com/Rain-kl/Wavelet/backend/pkg/config"
"github.com/Rain-kl/Wavelet/backend/pkg/logger"
"github.com/Rain-kl/Wavelet/backend/pkg/response"
otel_trace "github.com/Rain-kl/Wavelet/backend/pkg/trace"
database "github.com/Rain-kl/Wavelet/backend/plugins/infra/database"
"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"
"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/backend/pkg/testhelper"
"github.com/Rain-kl/Wavelet/pkg/testhelper"
"github.com/gin-gonic/gin"
)
@@ -15,8 +15,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/Rain-kl/Wavelet/backend/core"
"github.com/Rain-kl/Wavelet/backend/pkg/util"
"github.com/Rain-kl/Wavelet/core"
"github.com/Rain-kl/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/backend/core"
"github.com/Rain-kl/Wavelet/backend/core/extpoints"
"github.com/Rain-kl/Wavelet/backend/plugins/drivers/driver_asynq_cron"
"github.com/Rain-kl/Wavelet/backend/plugins/drivers/driver_asynq_worker"
"github.com/Rain-kl/Wavelet/backend/plugins/drivers/driver_http"
"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"
)
func init() {