title: What cases "cannot convert "%d" (type untyped string) to type int" in Go?
body: <pre><code>package main
  
  import (
      "fmt"
  )
  
  func printArray(x [3]int) {
      fmt.Printf("%d", x[1]);
      // cannot convert "%d" (type untyped string) to type int
      // invalid operation: "%d" + v (mismatched types string and int)
      // for _, v := range x {
      //  fmt.Printf("%d" + v);
      // }
  }
  
  func main() {
      a := [3]int{1, 2, 3};
  
      for _, v := range a {
          fmt.Printf("%d\n", v);
      }
  
      printArray(a); 
  }
  </code></pre>
  
  <p>I can successfully print the array in the go method, but when I pass array into the method, it throws an error when it tries to print. What cause's the method to treat it differently then main method?</p>