title: Generating prime numbers in Go
body: <p><strong>EDIT</strong>: The question essentially asks to generate prime numbers up to a certain limit. The original question follows.</p>
  
  <p>I want my <code>if</code> statement to become true if only these two conditions are met:</p>
  
  <pre><code>for i := 2; i &lt;= 10; i++ {
  
      if i%i == 0 &amp;&amp; i%1 == 0 {
  
      } else {
  
      }
  }
  </code></pre>
  
  <p>In this case every possible number gets past these conditions, however I want only the numbers 2, 3, 5, 7, 11... basically numbers that are divisible only with themselves and by 1 to get past, with the exception being the very first '2'. How can I do this?</p>
  
  <p>Thanks</p>