Golang学习笔记之结构体Struct

Golang学习笔记之结构体Struct.

结构Struct声明

type HtmlUrl struct{
    url string
    depth int
}

结构体实例化

firstHtml := HtmlUrl{}
firstHtml.url = "http://github.com"
firstHtml.depth = 1

Leave a Comment

豫ICP备19001387号-1