Skip to content

Instantly share code, notes, and snippets.

@GeertJohan
Created November 26, 2012 18:30
Show Gist options
  • Save GeertJohan/4149789 to your computer and use it in GitHub Desktop.
Save GeertJohan/4149789 to your computer and use it in GitHub Desktop.
var declaration examples
package main
import (
"log"
)
var outside = "outside"
func main() {
inside := "inside"
var inside2 = "also inside"
log.Println(outside)
log.Println(inside)
log.Println(inside2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment