2016年9月13日

GO基础:method相关

摘要: // method相关 // method是特殊的function,带有reciever参数。 // https://tour/golang.org package main import ( "fmt" "math" ) type Vertex struct{ X, Y float64 } // 阅读全文

posted @ 2016-09-13 21:22 荆南山砍柴人 阅读(172) 评论(0) 推荐(0)

Go基础:时间相关

摘要: // time相关 package main import ( "fmt" "time" ) var week time.Duration func main(){ t := time.Now() fmt.Println(t) //UTC表示通用协调世界时间 t = time.Now().UTC() 阅读全文

posted @ 2016-09-13 16:19 荆南山砍柴人 阅读(214) 评论(0) 推荐(0)

导航