go

                   simple, fast, safe, concurrent, fun
  1. Code
  2. Search
  3. Subscribe
  4. Archive
  5. Random

explorations into google's new language by nick quaranto

Newer
  • Installing Go on OSX 10.5

    Heavily inspired by this blog post. With MacPorts installed:

    sudo port install python easy_install
    sudo easy_install -U mercurial
    
    In your .zshrc:
    export GOROOT=[path to where you want the language installed]
    export GOOS=darwin
    export GOARCH=386
    export GOBIN=[path to where you store personal bin files]
    
    Run:
    source .zshrc
    hg clone -r release https://go.googlecode.com/hg/ $GOROOT
    cd $GOROOT/src
    ./all.bash 
    
    That should stick some binaries into your GOBIN directory. Create a helloworld.go:
    package main
    
    import fmt "fmt"
    
    func main() {
      fmt.Printf("HELLO WORLD");
    }
    
    Then run…
    $ 8g helloworld.go
    $ 8l helloworld.8
    $ ./8.out
    HELLO WORLD
    

    Posted on March 8, 2010 with 2 notes ()

    1. aeonra liked this
    2. alandipert liked this
    3. golang posted this

Field Notes Theme. Designed by Manasto Jones. Powered by Tumblr.