package main
import "fmt"
type s1 struct {
ID string
s2 s2
s3 s3
}
type s2 struct {
WebSiteName string
URL string
}
type s3 struct {
KeyWord []string
Where string
}
func main() {
ss := s1{
ID: "123456",
s2: s2{
WebSiteName: "ydook.com",
URL: "www.ydook.com",
},
s3: s3{
// 重点:在结构体内部使用数组
KeyWord: []string{"IT", "AI", "Web", "technology", "knowledge"},
Where: "IT",
},
}
fmt.Println(ss)
}