title: panic: reflect: call of reflect.Value.Call on zero Value
body: <p>I'm trying to use reflection in order to make a dynamic function call based on user input. I'm collecting user input like such:</p>
  
  <pre><code>func main() {
      for {
          reader := bufio.NewReader(os.Stdin)
          fmt.Print("&gt; ")
          command, _ := reader.ReadString('\n')
          runCommandFromString(command)
      }
  }
  </code></pre>
  
  <p>This is how the command is parsed out</p>
  
  <pre><code>func stringCommandParser(cmd string) *Command {
      cmdParts := strings.Split(
          strings.TrimSpace(cmd),
          " ",
      )
      return &amp;Command{
          Name: cmdParts[0],
          Args: cmdParts[1:],
      }
  }
  
  func runCommandFromString(cmd string) {
      command := stringCommandParser(cmd)
  
      c := &amp;Commander{}
      f := reflect.ValueOf(&amp;c).MethodByName(command.Name)
      inputs := []reflect.Value{reflect.ValueOf(command)}
      f.Call(inputs)
  }
  </code></pre>
  
  <p>The commands.go file looks like this</p>
  
  <pre><code>type Command struct {
      Name string
      Args []string
  }
  
  type Commander struct {}
  
  func (c Commander) Hello(cmd Command) {
      fmt.Println("Meow", cmd.Args)
  }
  </code></pre>
  
  <p>When I run the program, I get a prompt and I run a command called "Hello" with a param called "world". I would expect "Meow [World]" or something like that to appear. Like this:</p>
  
  <pre><code>&gt; Hello world
  Meow world
  </code></pre>
  
  <p>Instead what I get is a panic that looks like this:</p>
  
  <pre><code>&gt; Hello world
  panic: reflect: call of reflect.Value.Call on zero Value
  
  goroutine 1 [running]:
  panic(0x123360, 0xc420014360)
      /Users/parris/.gvm/gos/go1.7.4/src/runtime/panic.go:500 +0x1a1
  reflect.flag.mustBe(0x0, 0x13)
      /Users/parris/.gvm/gos/go1.7.4/src/reflect/value.go:201 +0xae
  reflect.Value.Call(0x0, 0x0, 0x0, 0xc420055e00, 0x1, 0x1, 0x0, 0x0, 0x0)
      /Users/parris/.gvm/gos/go1.7.4/src/reflect/value.go:300 +0x38
  main.runCommandFromString(0xc42000c8a0, 0xc)
      /Users/parris/Projects/distro/main/utils.go:26 +0x1a0
  main.main()
      /Users/parris/Projects/distro/main/main.go:14 +0x149
  exit status 2
  </code></pre>
  
  <p>How can I fix this? Also, what is happening?</p>