Created
August 1, 2020 13:58
-
-
Save luandevpro/6ecf12b07ea3059500901a4d7be51b07 to your computer and use it in GitHub Desktop.
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
package main | |
import ( | |
"fmt" | |
) | |
type Address struct { | |
address string | |
phone int | |
} | |
type Student struct { | |
name string | |
email string | |
age int | |
address Address | |
} | |
func main() { | |
student := Student{ | |
name: "tran", | |
email: "tran@gmail.com", | |
age: 25, | |
address: Address{address: "DN", phone: 84935}, | |
} | |
fmt.Println(student.address.address) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment