Skip to content

Instantly share code, notes, and snippets.

@moraes
moraes / gist:2647771
Created May 9, 2012 18:33
bash profile for golang
# Go
export GOOS=linux
export GOARCH=amd64
export GOROOT=$HOME/dev/go
export GOBIN=$GOROOT/bin
export GOPATH=$HOME/dev/gopath
export PATH=$PATH:$GOBIN
@moraes
moraes / server.go
Created May 2, 2012 16:02 — forked from jaybill/server.go
gorilla sessions issue
package main
import (
"encoding/gob"
"net/http"
"code.google.com/p/gorilla/sessions"
"log"
)
var store = sessions.NewCookieStore([]byte("something-very-secret"))
@moraes
moraes / gist:2370781
Created April 12, 2012 20:32
GetPage for App Engine datastore (Go)
package foo
import (
"reflect"
"appengine"
"appengine/datastore"
)
var (
@moraes
moraes / gist:2141121
Last active May 1, 2023 19:02
LIFO Stack and FIFO Queue in golang
package main
import (
"fmt"
)
type Node struct {
Value int
}