-1
Mein GOPATH und GOROOT
GOPATH="/Users/road/IdeaProjects/MiniJVM"
GOROOT="/usr/local/go"
Meine golang Projektstruktur
Myproject
---.idea
---src
---cmd
---cmd.go
---test
---test.go
test.go Datei, werde ich die Einfuhren aus anderen Paketen nutzen .Was mit meinem Code falsch? Oder der Importpfad hat ein Problem?
package main
import (
"fmt"
"cmd"
)
func main() {
command := &Cmd{}//unresolved type 'Cmd'
}
cmd.go Datei
package cmd
import (
"flag"
"fmt"
"os"
)
/*
jaca [-option] class [args...]
*/
type Cmd struct {
HelpFlag bool
VersionFlag bool
CpOption string
Class string
Args []string
}