title: Looking for reasonable stack implementation in golang?
body: <p>So far my naive approach is </p>
  
  <pre><code>type stack []int
  
  func (s *stack) Push(v int) {
      *s = append(*s, v)
  }
  
  func (s *stack) Pop() int {
      res:=(*s)[len(*s)-1]
      *s=(*s)[:len(*s)-1]
      return res
  }
  </code></pre>
  
  <p>it works - <a href="https://play.golang.org/p/0-auehHDzY" rel="noreferrer">playground</a>, but looks ugly and has too much dereferencing. Can I do better? </p>