title: Is there a better dependency injection pattern in golang?
body: <p>Given this code:</p>
  
  <pre><code>package main
  
  import (
      "fmt"
  )
  
  type datstr string
  
  type Guy interface {
     SomeDumbGuy() string
  }
  
  func (d *datstr) SomeDumbGuy() string {
    return "some guy"
  }
  
  func someConsumer(g Guy) {
    fmt.Println("Hello, " + g.SomeDumbGuy())
  }
  
  func main() {
      var d datstr
      someConsumer(&amp;d)
  }
  </code></pre>
  
  <p>Is the wiring of components together that's done in <strong>main</strong> the right way to wire a dependency together?  It seems like I'm over using this a bit in my code.  Is there a common pattern better than this, or am I overthinking it?</p>