title: Workflow for creating packages in Go
body: <p>I understand that programs in Go are run from the <code>main</code> function as their starting point. But I was wondering what the workflow is for creating functions for a new package.</p>
  
  <p>In python for example I use <code>__main__</code> in module's when the module is called directly. When the module is imported from another file <code>__main__</code> would be ignored. Which is useful when you're developing a new module.</p>
  
  <pre><code>if __name__ == "__main__":
      # Run module code here if module called directly
  </code></pre>
  
  <p>For Go I'm using a test.go file with a <code>package main</code> along with my main.go file to test functions in packages I'm creating. </p>
  
  <pre><code>// test.go
  package main
  
  import (
      "newpackage"
  )
  
  func main() {
      newpackage.MyNewFunc()
  }
  </code></pre>
  
  <p>Is there a better way to do this or is this the standard workflow? Thanks.</p>