文件夹结构:
- myproject
- resolver
- resolver.go
- main.go
go mod init github.com/kaleabbyh/foodrecipie
解析器.go:
package resolvers
import "fmt"
func resolverfunc(){
fmt.Println("resolvers are running")
}
main.go:
package main
import (
"fmt"
"github.com/kaleabbyh/foodrecipie/resolvers"
)
func main(){
resolvers.resolverfunc()
fmt.Println("main is running")
}
我尝试按照上面的详细信息进行操作,但它返回了我
没有必需的模块提供包“github.com/kaleabbyh/foodrecipie/resolvers”