Skip to content

Commit 4d9d43b

Browse files
committed
zz
1 parent 9a0a21f commit 4d9d43b

File tree

7 files changed

+53
-1
lines changed

7 files changed

+53
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@
3838

3939
| 支付宝 | 微信 |
4040
|:-----:|:-----:|
41-
|![alipay](images/donate-alipay-github-chai2010.jpg)|![weixin](images/donate-weixin-github-chai2010.jpg)|
41+
|![alipay](images/donate-alipay-github-chai2010-20yuan.jpg)|![weixin](images/donate-weixin-github-chai2010-20yuan.jpg)|

ch2/ch2-1.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# 2.1 Go包机制
2+
3+
<!--
4+
1.
5+
语言只定义了包的概念
6+
包可以有不同的实现,比如基于zip的包集合
7+
8+
最早是没有gopath的
9+
makefile时代的编译,和goroot是放在一起的
10+
11+
2.
12+
gopath
13+
intrnal
14+
vendor
15+
16+
和std同名的包
17+
18+
3.
19+
vendor的问题
20+
本质原因是不同包中的类型不一样
21+
vendor内的包对应新路径的包
22+
23+
4. 模块的设计⽬标
24+
25+
问题,有时候需要调试,临时修改以来包的代码,
26+
但是修改之后会导致其它依赖此包的应用被影响,可以用replace吗
27+
28+
5. 模块快速⼊⻔
29+
30+
6. go.mod 和 go.sum⽂件
31+
32+
7. go get重新⼊⻔
33+
34+
8. 语义化版本号
35+
36+
9. v1/v2/v3版本共存
37+
38+
10. ⼦模块
39+
40+
11. 最⼩化版本选择
41+
42+
12. 版本不相容和间接依赖
43+
44+
13. go mod命令
45+
46+
14. 私有仓库/镜像
47+
以前是每个pkg的go get需要DNS查网址,如果要定制指南修改hosts文件,
48+
但是修改hosts文件将对其它应用产生影响。
49+
50+
-->

ch2/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
# 第2章 模块化
2+
3+
TODO
26.5 KB
Loading
-33.2 KB
Binary file not shown.
24.4 KB
Loading
-27.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)