title: List of strings and ints in go?
body: <p>I have no idea what I am doing and I decided to try out using a <a href="http://golang.org/pkg/container/list/#New" rel="noreferrer">list (docs)</a> in go. This is the most I can figure out</p>
  
  <ol>
  <li>Why is %v printing <code>{0xf840024660 &lt;nil&gt; 0xf840023660 4}</code>?</li>
  <li>Why am I not getting an error for mixing ints with strings?</li>
  <li>How do I force a type? (such as ints only, strings only etc)</li>
  </ol>
  
  <p>Code:    </p>
  
  <pre><code>package main
  
  import "fmt"
  import "container/list"
  
  func main() {
      ls := list.New()
      ls.PushBack("a")
      ls.PushBack(4)
      ls.PushBack("5")
      fmt.Println(ls)
      ls2 := list.New()
      ls2.PushBack(4)
      ls2.PushBack(8)
      fmt.Printf("%v\naaa\n", *ls2.Front())
      fmt.Println(*ls2.Back())
  }
  </code></pre>