智慧 + 毅力 = 无所不能

正确性、健壮性、可靠性、效率、易用性、可读性、可复用性、兼容性、可移植性...

导航

2015年2月27日

摘要: 转自:http://studygolang.com/topics/548例子Packages.go:package mainimport ( "fmt" "math/rand")func add(x int, y int) int { return x + y}func main(... 阅读全文

posted @ 2015-02-27 17:23 Bill Yuan 阅读(501) 评论(0) 推荐(2) 编辑

摘要: 转自:http://studygolang.com/topics/549Go 没有类,但可以在结构体类型上定义方法。package main import ( "fmt" "math" )type Vertex struct { X, Y float64 }func (v Vertex)... 阅读全文

posted @ 2015-02-27 17:11 Bill Yuan 阅读(425) 评论(0) 推荐(0) 编辑