Go Programming Language: Hello World (Fedora 13)

If you're interested in trying the Go Programming Language I've created an RPM for Fedora 13 to get you started quick (this package is in no way suitable for submission to Fedora).

  1. Download the x86_64 (or i386) RPM.

  2. Install the Go package using yum.

    sudo yum localinstall --nogpgcheck go-0.0.0*.rpm
    
  3. Open a new shell.

  4. Create a file named hello.go and enter the following code:

    package main
    
    import "fmt"
    
    func main() {
      fmt.Printf("Hello World!")
    }
    
  5. Compile, link and run (replace 6 with 8 if you're using i386).

    $ 6g hello.go
    $ 6l hello.6
    $ ./6.out
    

You can view the latest RPM source on GitHub.

Update: It looks like someone has already created a much better package.