estrutura de pastas:
- myproject
- resolver
- resolver.go
- main.go
go mod init github.com/kaleabbyh/foodrecipie
resolver.go:
package resolvers
import "fmt"
func resolverfunc(){
fmt.Println("resolvers are running")
}
principal.go:
package main
import (
"fmt"
"github.com/kaleabbyh/foodrecipie/resolvers"
)
func main(){
resolvers.resolverfunc()
fmt.Println("main is running")
}
Tento fazer igual aos detalhes acima mas me retorna
nenhum módulo obrigatório fornece o pacote "github.com/kaleabbyh/foodrecipie/resolvers"