Trying to import a struct type from another package, and it returns perfectly, but the values of that struct can't be found unless declared without the use of an instantiation function.
// X executes and finds values fine, Z does not.
package main
func main () {
x := &Command{}
z := command.NewCommand()
fmt.Println(x.command)
fmt.Println(z.command)
}
package command
type Command struct {
// Our structured data/object for Command
alias string
command string
verbose bool
}
func NewCommand() *Command {
// Creates a new container for []Command objects
return &Command{"","",false}
}
What exactly am I missing here...?