Pārlūkot izejas kodu

精校:5.5

增加极客学院格式支持
Unknwon 10 gadi atpakaļ
vecāks
revīzija
4501794707

+ 18 - 0
README_gc.md

@@ -0,0 +1,18 @@
+# Go 入门指南
+
+## 本书介绍
+
+在接触 Go 语言之后,对这门编程语言非常着迷,期间也陆陆续续开始一些帮助国内编程爱好者了解和发展 Go 语言的工作,比如开始录制视频教程[《Go编程基础》](https://github.com/Unknwon/go-fundamental-programming)。但由于目前国内并没有比较好的 Go 语言书籍,而国外的优秀书籍因为英文的缘故在一定程度上也为不少 Go 语言爱好者带来了一些学习上的困扰,不仅为了加快扩散 Go 爱好者的国内群体,本人在完成阅读这本名叫 《The Way to Go》 之后,决定每天抽出一点时间来进行翻译的工作,并且以开源的形式免费分享给有需要的 Go 语言爱好者。
+
+## 适用人群
+
+适合有一定编程基础,初学 Go 语言的爱好者。
+
+>
+Martini&Macaron 交流群:371440803
+>
+Golang 编程:245386165
+
+|更新日期    |更新内容
+|----------|------------------
+|2015-07-18|

+ 0 - 0
TOC.md


+ 6 - 0
config.json

@@ -0,0 +1,6 @@
+{
+	"name": "Go 入门指南",
+	"introduction": "Go 经典书籍《The Way To Go》的中文译本。",
+	"content": "eBook",
+	"readme": "README_gc.md"
+}

+ 2 - 2
eBook/01.1.md

@@ -4,7 +4,7 @@ Go 语言起源 2007 年,并于 2009 年正式对外发布。它从 2009 年 9
 
 **这是一个由计算机领域 “发明之父” 所组成的黄金团队,他们对系统编程语言,操作系统和并行都有着非常深刻的见解**
 
-![](images/1.1.designers_of_Go.jpg?raw=true)
+![](../images/1.1.designers_of_Go.jpg?raw=true)
 
 图 1.1 Go 语言设计者:Griesemer、Thompson 和 Pike
 
@@ -34,7 +34,7 @@ Go 语言的官方网站是 [golang.org](http://golang.org),这个站点采用
 
 Go 通过以下的 Logo 来展示它的速度,并以囊地鼠(Gopher)作为它的吉祥物。
 
-![](images/1.2.Go_logo.jpg?raw=true)
+![](../images/1.2.Go_logo.jpg?raw=true)
 
 图1.2 Go 语言 Logo
 

+ 1 - 1
eBook/01.2.md

@@ -12,7 +12,7 @@
 
 下图展示了一些其它编程语言对 Go 语言的影响:
 
-![](images/1.3.influences_on_go.jpg?raw=true)
+![](../images/1.3.influences_on_go.jpg?raw=true)
 
 图 1.3 其它编程语言对 Go 语言的影响
 

+ 1 - 1
eBook/02.1.md

@@ -26,7 +26,7 @@ Go 语言开发团队开发了适用于以下操作系统的编译器:
 
 	编译器目前支持以下基于 Intel 或 AMD 处理器架构的程序构建。
 
-	![](images/2.1.gc.jpg?raw=true)
+	![](../images/2.1.gc.jpg?raw=true)
 
 	图2.1 gc 编译器支持的处理器架构
 

+ 1 - 1
eBook/02.3.md

@@ -47,7 +47,7 @@
 	
 	在完成编译之后(通常在 1 分钟以内,如果你在 B 型树莓派上编译,一般需要 1 个小时),你会在终端看到如下信息被打印:
 
-	![](images/2.3.allbash.png?raw=true)
+	![](../images/2.3.allbash.png?raw=true)
 
 	图 2.3 完成编译后在终端打印的信息
 

+ 2 - 2
eBook/03.2.md

@@ -29,7 +29,7 @@ LiteIDE 是一款非常好用的轻量级 Go 集成开发环境(基于 QT、Ka
 
 同时,它具备了抽象语法树视图的功能,可以清楚地纵览项目中的常量、变量、函数、不同类型以及他们的属性和方法。
 
-![](images/3.2.liteide.jpg?raw=true)
+![](../images/3.2.liteide.jpg?raw=true)
 
 图 3.1 LiteIDE 代码编辑界面和抽象语法树视图
 
@@ -39,7 +39,7 @@ LiteIDE 是一款非常好用的轻量级 Go 集成开发环境(基于 QT、Ka
 
 其依附于著名的 Eclipse 这个大型开发环境,虽然需要安装 JVM 运行环境,但却可以很容易地享有 Eclipse 本身所具有的诸多功能。这是一个非常好的编辑器,完善的代码补全、抽象语法树视图、项目管理和程序调试功能。
 
-![](images/3.2.goclipse.jpg?raw=true)
+![](../images/3.2.goclipse.jpg?raw=true)
 
 图 3.2 GoClipse 代码编辑界面、抽象语法树视图和项目管理
 

+ 3 - 3
eBook/04.4.md

@@ -147,13 +147,13 @@ func main() {
 
 所有像 int、float、bool 和 string 这些基本类型都属于值类型,使用这些类型的变量直接指向存在内存中的值:
 
-![](images/4.4.2_fig4.1.jpg?raw=true)
+![](../images/4.4.2_fig4.1.jpg?raw=true)
 
 另外,像数组(第 7 章)和结构(第 10 章)这些复合类型也是值类型。
 
 当使用等号 `=` 将一个变量的值赋值给另一个变量时,如:`j = i`,实际上是在内存中将 i 的值进行了拷贝:
 
-![](images/4.4.2_fig4.2.jpg?raw=true)
+![](../images/4.4.2_fig4.2.jpg?raw=true)
 
 你可以通过 &i 来获取变量 i 的内存地址(第 4.9 节),例如:0xf840000040(每次的地址都可能不一样)。值类型的变量的值存储在栈中。
 
@@ -163,7 +163,7 @@ func main() {
 
 一个引用类型的变量 r1 存储的是 r1 的值所在的内存地址(数字),或内存地址中第一个字所在的位置。
 
-![](images/4.4.2_fig4.3.jpg?raw=true)
+![](../images/4.4.2_fig4.3.jpg?raw=true)
 
 这个内存地址为称之为指针(你可以从上图中很清晰地看到,第 4.9 节将会详细说明),这个指针实际上也被存在另外的某一个字中。
 

+ 2 - 2
eBook/04.9.md

@@ -64,7 +64,7 @@ func main() {
 
 我们可以用下图来表示内存使用的情况:
 
-![](images/4.4.9_fig4.4.png?raw=true)
+![](../images/4.4.9_fig4.4.png?raw=true)
 
 程序 string_pointer.go 为我们展示了指针对string的例子。
 
@@ -95,7 +95,7 @@ func main() {
 
 内存示意图如下:
 
-![](images/4.4.9_fig4.5.png?raw=true)
+![](../images/4.4.9_fig4.5.png?raw=true)
 
 **注意事项** 
 

+ 8 - 8
eBook/05.5.md

@@ -2,9 +2,9 @@
 
 您可以使用 break 语句重写 for2.go 的代码:
 
-Listing 5.10 [for3.go](examples/chapter_5/for3.go):
+示例 5.10 [for3.go](examples/chapter_5/for3.go):
 
-```
+```go
 for {
 	i = i - 1
 	fmt.Printf(“The variable i is now: %d\n”, i)
@@ -20,9 +20,9 @@ for {
 
 下面的示例中包含了嵌套的循环体(for4.go),break 只会退出最内层的循环:
 
-Listing 5.11 [for4.go](examples/chapter_5/for4.go):
+示例 5.11 [for4.go](examples/chapter_5/for4.go):
 
-```
+```go
 package main
 
 func main() {
@@ -44,9 +44,9 @@ func main() {
 
 关键字 continue 忽略剩余的循环体而直接进入下一次循环的过程,但不是无条件执行下一次循环,执行之前依旧需要满足循环的判断条件。
 
-Listing 5.12 [for5.go](examples/chapter_5/for5.go):
+示例 5.12 [for5.go](examples/chapter_5/for5.go):
 
-```
+```go
 package main
 
 func main() {
@@ -66,9 +66,9 @@ func main() {
 0 1 2 3 4 6 7 8 9
 ```
 
-5被跳过了。
+显然,5 被跳过了。
 
-关键字 continue 只能被用于 for 循环中。
+另外,关键字 continue 只能被用于 for 循环中。
 
 ## 链接
 

+ 0 - 0
eBook/images/1.1.designers_of_Go.jpg → images/1.1.designers_of_Go.jpg


+ 0 - 0
eBook/images/1.2.Go_logo.jpg → images/1.2.Go_logo.jpg


+ 0 - 0
eBook/images/1.3.influences_on_go.jpg → images/1.3.influences_on_go.jpg


+ 0 - 0
eBook/images/2.1.gc.jpg → images/2.1.gc.jpg


+ 0 - 0
eBook/images/2.3.allbash.png → images/2.3.allbash.png


+ 0 - 0
eBook/images/3.2.goclipse.jpg → images/3.2.goclipse.jpg


+ 0 - 0
eBook/images/3.2.liteide.jpg → images/3.2.liteide.jpg


+ 0 - 0
eBook/images/4.4.2_fig4.1.jpg → images/4.4.2_fig4.1.jpg


+ 0 - 0
eBook/images/4.4.2_fig4.2.jpg → images/4.4.2_fig4.2.jpg


+ 0 - 0
eBook/images/4.4.2_fig4.3.jpg → images/4.4.2_fig4.3.jpg


+ 0 - 0
eBook/images/4.4.9_fig4.4.png → images/4.4.9_fig4.4.png


+ 0 - 0
eBook/images/4.4.9_fig4.5.png → images/4.4.9_fig4.5.png


+ 0 - 0
eBook/images/7.1_fig7.1.png → images/7.1_fig7.1.png


+ 0 - 0
eBook/images/7.2_fig7.2.1.png → images/7.2_fig7.2.1.png


+ 0 - 0
eBook/images/7.2_fig7.2.png → images/7.2_fig7.2.png


+ 0 - 0
eBook/images/7.3_fig7.3.png → images/7.3_fig7.3.png


+ 0 - 0
eBook/images/7.6_fig7.4.png → images/7.6_fig7.4.png