目录结构:
src
go.mod
lib/migrate
migrate.go
/driver/source
local.go
我试图像这样local
导入:migrate.go
package migrate
import (
local "app/lib/migrate/driver/source/local"
)
type Migrate struct {
}
我收到此错误:
could not import app/lib/migrate/driver/source/local (no required module provides package "app/lib/migrate/driver/source/local")
我检查了以下项目:
- go.mod 声明
module app
- local.go 声明
package local
- 转到环境-w GO111MODULE=on