This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// LogResponseWritter wraps the standard http.ResponseWritter allowing for more | |
// verbose logging | |
type LogResponseWritter struct { | |
status int | |
size int | |
http.ResponseWriter | |
} | |
// func NewMyResponseWriter(res http.ResponseWriter) *MyResponseWriter { | |
// // Default the status code to 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
key := securecookie.GenerateRandomKey(64) | |
encoded := base64.StdEncoding.EncodeToString(key) | |
decoded, _ := base64.StdEncoding.DecodeString(encoded) | |
log.Println(key) | |
log.Println(encoded) | |
log.Println(decoded) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step #1 setup cross compiler(s) you want/need to use | |
cd $(go env GOROOT)/src | |
GOOS=linux GOARCH=amd64 ./make.bash <- GOOS=operating system - linux, darwin, windows etc... GOARCH=architechture - amd64, x86_64 386... | |
Step #2 navigate to go project | |
cd /path/of/go/project | |
env GOOS=linux GOARCH=amd64 go build |
NewerOlder