title: Circular import with structs
body: <p>I have a project with several modules in Go. I am having problem with circular imports because of the scenario below:</p>
  <h1>Details</h1>
  <p>A module Game contains a struct with the current Game state. Another module (Modifier) is doing some game specific stuff and calculations and therefore modifies the game state. Because of this, Modifier will need the struct Game, but not any methods from Game. Modifier is called from Game and here we have the circular import.</p>
  <h1>Problem:</h1>
  <ul>
  <li><p>Game initiates Modifier</p>
  </li>
  <li><p>Modifier needs Game struct</p>
  </li>
  </ul>
  <p>It seems to me that this is a common scenario, so I wonder how I should solve it in the best way. My solution would be to create a third module &quot;Structs&quot; which just contains all the structs for the whole application. Is this a good solution?</p>