Web Analytics

Go语言标准库概览

本文翻译自Dr.Dobb's的"A Brief Tour of the Go Standard Library"一文。 **在Go语言五周系列教程的最后一部分中,我们将带领大家一起来浏览一下Go语言丰富的标准库。** Go标准库包含了大量包,提供了丰富广泛的功能特性。这里提供了概览仅仅是有选择性的且非常简单。本文发表后,标准库的内容还可能继续增加,因此 建议大家最好是通过在线查阅库API或使用go...

September 8, 2012 · 18 min · Tony Bai

Go程序设计语言(三)

本文译自Rob Pike的Go语言PPT教程 – "The Go Programming Language Part3(updated June 2011)"。由于该教程的最新更新时间早于Go 1版本发布,因此该PPT中的一些内容与Go 1语言规范略有差异,到时我会在相应的地方做上注解。 第三部分大纲 ------ * 并发与通信 * Goroutines * 通道(Channel) * 并发相关...

August 28, 2012 · 11 min · Tony Bai

Go程序设计语言(二)

重写工作方式正如字段一样。 type NamedPoint struct {     Point     name string } func (n \*NamedPoint) Abs() float64 {    return n.Point.Abs() \* 100. } n := &NamedPoint{Point{3, 4}, "Pythagoras"} fmt.Println(n.Abs...

August 27, 2012 · 10 min · Tony Bai

Go程序设计语言(一)

int          uint int8      uint8 = byte int16       uint16 int32       uint32         float32      complex64 int64       uint64         float64      complex128 还有uintptr,一个大小足够存储一个指针的数值。 这些都是互不相同的类型;...

August 23, 2012 · 13 min · Tony Bai

也谈Go语言编程 – Hello,Go!

_**Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system ena...

August 17, 2012 · 11 min · Tony Bai