Skip to content

Instantly share code, notes, and snippets.

@luandevpro
Created August 1, 2020 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luandevpro/25299d7b15b8d7d4ff307aa3a087e86b to your computer and use it in GitHub Desktop.
Save luandevpro/25299d7b15b8d7d4ff307aa3a087e86b to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
type Student struct {
Name string
Email string
Age int
}
func main() {
student := &Student{
Name: "tran",
Email: "tran@gmail.com",
Age: 25,
}
fmt.Println(&student)
fmt.Println(student.Age)
fmt.Println((*student).Age)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment