package main
import (
"banco/contas"
"fmt"
)
func main() {}
package contas
type ContaCorrente struct {
titular string
numeroAgencia int
numeroConta int
saldo float64
}
cliente@PRINCIPAL:~/development/golang/project-conta$ tree . ├── banco │ └── contas │ └── ContaCorrente.go ├── go.mod └── main.go
2 directories, 3 files
could not import banco/contas (no required module provides package "banco/contas")compilerBrokenImport
SOLUÇÃO no terminal ~/development/golang/project-conta$ go mod init banco
vite go.mod module banco
go 1.22.1
files
package main
import (
"banco/contas"
"fmt"
)
package contas
type ContaCorrente struct {
Titular string
NumeroConta int
NumeroAgencia int
Saldo float64
}