title: Simple golang program doesn't run
body: <p>Here is a simple golang script T1.go:</p>
  
  <pre><code>package main
  
  import "fmt"
  
  func main() {
      fmt.Println("Hello world")
  }
  </code></pre>
  
  <p>run it with <code>go run T1.go</code>, I get:</p>
  
  <pre><code>T1.go:1:15: expected ';', found 'import'
  </code></pre>
  
  <p>If I added <code>;</code> to line end, the program is okay to run:</p>
  
  <pre><code>package main;
  
  import "fmt";
  
  func main() {
      fmt.Println("Hello world")
  }
  </code></pre>
  
  <p>But isn't the semicolon redundant of line ending in golang?</p>
  
  <p>PS: I am on 64bit window 7, the golang version is <code>devel +f4d1cb8d9a91</code> or <strong>1.2rc1</strong>. The <em>error</em> code runs perfect on <a href="http://play.golang.org/" rel="nofollow">http://play.golang.org/</a></p>
  
  <p><strong>Updates</strong> I've used <code>dos2unix</code> to convert the source code to unix line ending, but it doesn't change anything</p>
  
  <p><strong>Notes</strong> My go is installed in <code>C:\go</code> directory and the <code>C:\go\bin</code> is added into the <code>%PATH%</code> environment variable; The source code <code>T1.go</code> is put inside the <code>C:\t\go</code> directory, which is different from the go installation directory. Not sure if this configuration contribute to the issue.</p>