Skip to content

Instantly share code, notes, and snippets.

@incfly
Created December 8, 2016 08:07
Show Gist options
  • Save incfly/2f1bc802f229390d7b7037fe7797091f to your computer and use it in GitHub Desktop.
Save incfly/2f1bc802f229390d7b7037fe7797091f to your computer and use it in GitHub Desktop.
package main
import "fmt"
type Person struct{
Name string
Age int
}
func main() {
pp := []* Person{ {"A", 12} }
var p *Person
p = &Person{"BC", 3}
fmt.Println(pp)
fmt.Println(p)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment