title: How to access a struct from an external package in Go
body: <p>I'm trying to import a struct from another package in the following file:</p>
  
  <pre><code>// main.go
  import "path/to/models/product"    
  product = Product{Name: "Shoes"}
  
  // models/product.go
  type Product struct{
   Name string
  }
  </code></pre>
  
  <p>But in the <code>main.go</code> file the struct <code>Product</code> is undefined. How do I import the struct?</p>