Hello everybody,
I don’t have much programming experience but now I’m trying to learn a programming language well, in the end I chose GO. After reading a few books and doing some little tests with the code, I followed a more complete tutorial to try to make a first complete program. Unfortunately I got stuck almost immediately because by running the first part of the program I get errors and by myself I could not solve them, I ask you for help (sorry for the bad English). This is the first part of the code:
main.go
package main
import (
"log"
"github.com/dixonwille/wmenu/v5"
)
func main() {
menu := wmenu.NewMenu("What would you like to do?")
menu.Action(func(opts []wmenu.Opt) error { handleFunc(opts); return nil })
menu.Option("Add a new Person", 0, true, nil)
menu.Option("Find a Person", 1, false, nil)
menu.Option("Update a Person's information", 2, false, nil)
menu.Option("Delete a person by ID", 3, false, nil)
menuerr := menu.Run()
if menuerr != nil {
log.Fatal(menuerr)
}
}
the error:
go run main.go
main.go:5:2: cannot find package "github.com/dixonwille/wmenu/v5" in any of:
/home/linuxbrew/.linuxbrew/Cellar/go/1.19.2/libexec/src/github.com/dixonwille/wmenu/v5 (from $GOROOT)
/home/max/go/src/github.com/dixonwille/wmenu/v5 (from $GOPATH)
Where am I wrong? The package has been installed.
Can you help me?