Skip to content

Commit d8f36dd

Browse files
committed
Update:更新文章
1 parent 3244cd1 commit d8f36dd

File tree

6 files changed

+34
-11
lines changed

6 files changed

+34
-11
lines changed

source/c01/c01_17.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,16 @@
7474
fmt.Println(msg)
7575
}
7676
77-
然后执行
78-
如下命令进行编译,里面有好多个参数,我还没去了解是什么意思,有疑问的可以自行搜索引擎
77+
然后执行 如下命令进行编译,里面有好多个参数,有疑问的可以自行搜索引擎
7978

8079
.. code:: shell
8180
81+
# 关闭内联优化,方便调试
8282
$ go build -gcflags "-N -l" demo.go
8383
84+
# 发布版本删除调试符号
85+
go build -ldflags “-s -w”
86+
8487
最后使用 GDB 命令进入调试界面
8588

8689
.. code:: shell
@@ -129,7 +132,7 @@
129132
- ``info args``\ :查看函数的参数值及要返回的变量值
130133
- ``info frame``\ :堆栈帧信息
131134
- ``info goroutines``\ :查看 goroutines 信息。在使用前
132-
,需要注意先执行 /usr/local/go/src/runtime/runtime-gdb.py
135+
,需要注意先执行 source /usr/local/go/src/runtime/runtime-gdb.py
133136

134137
- ``goroutine 1 bt``\ :查看指定序号的 goroutine 调用堆栈
135138
- 回车:重复执行上一次操作
@@ -193,6 +196,12 @@
193196

194197
以上就是关于 GDB 的使用方法,非常简单,可以自己手动敲下体验一下。
195198

199+
**参考文章**
200+
201+
- `go 官方对于 gdb 的使用说明 <https://golang.org/doc/gdb>`__
202+
- `Mac 调试 golang
203+
程序 <%5Bhttps://www.do1618.com/archives/771/mac-gdb-%E8%B0%83%E8%AF%95-golang-%E7%A8%8B%E5%BA%8F/%5D(https://www.do1618.com/archives/771/mac-gdb-调试-golang-程序/)>`__
204+
196205
|image4|
197206

198207
.. |image0| image:: http://image.iswbm.com/20200428180632.png

source/c02/c02_06.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2.6 动态类型与静态类型
2+
======================
3+
4+
https://studygolang.com/articles/13042
5+
6+
https://blog.csdn.net/stpeace/article/details/84037370

source/c05/c05_01.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ $ go run main.go
8787

8888

8989

90-
## 4. 表的设计
90+
## 3. 表的设计
9191

9292
### 用户(users)
9393

@@ -297,7 +297,7 @@ CREATE TABLE `comments` (
297297

298298

299299

300-
## 5. 接口整理
300+
## 4. 接口整理
301301

302302
### 文章
303303

@@ -392,9 +392,7 @@ CREATE TABLE `comments` (
392392

393393

394394

395-
##
396-
397-
## 6. 项目结构解析
395+
## 5. 项目结构解析
398396

399397
以之前创建的项目目录为根目录,继续创建如下目录
400398

source/c05/c05_01.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110

111111
image-20200419175221473
112112

113-
4. 表的设计
113+
3. 表的设计
114114
-----------
115115

116116
用户(users)
@@ -355,7 +355,7 @@
355355
FOREIGN KEY (`post_in`) REFERENCES articles(id)
356356
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='评论管理';
357357
358-
5. 接口整理
358+
4. 接口整理
359359
-----------
360360

361361
文章
@@ -463,7 +463,7 @@ Response
463463
"message": "OK"
464464
}
465465
466-
6. 项目结构解析
466+
5. 项目结构解析
467467
---------------
468468

469469
以之前创建的项目目录为根目录,继续创建如下目录

source/c06/c06_01.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,11 @@ https://learnku.com/docs/the-way-to-go
4545
9、Go语言圣经
4646

4747
https://go.wuhaolin.cn/gopl/
48+
49+
10、mojotv
50+
51+
https://mojotv.cn/404#Golang
52+
53+
11、cyent的 Golang 笔记
54+
55+
https://cyent.github.io/golang/

source/c06/c06_02.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
6.2 配置高颜值 IDE:Goland
2+
==========================

0 commit comments

Comments
 (0)