title: How do I access functions in the main package?
body: <p>Per the setup:</p>
  
  <pre><code>$GOPATH/
    github.com/ddavison/project/
      subpackage/
        lib.go
      main.go
  </code></pre>
  
  <h3>lib.go</h3>
  
  <pre><code>package subpackage
  ...
  func Hello() {
    fmt.Println("hello")
  }
  </code></pre>
  
  <h3>main.go</h3>
  
  <pre><code>package main
  ...
  func main() {
    ...
  }
  
  func DoSomething() {
    fmt.Println("done!")
  }
  </code></pre>
  
  <p>From <strong>main.go</strong>, I know that I am able to call <code>lib.go</code>'s functions by doing</p>
  
  <pre><code>import "github.com/ddavison/project/subpackage"
  lib.Hello()
  </code></pre>
  
  <p>But how can I do the inverse, <strong>call a method from <code>main.go</code> from <code>lib.go</code></strong>?  How can I call <code>DoSomething()</code> from <code>lib.go</code>?</p>