Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 04.2.md #548

Merged
merged 1 commit into from
Sep 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update 04.2.md
提高翻译的可读性,我在读这句话的时候反复读了三四遍没看懂,最后看原文才看懂。附原文:
> Variables (like constants) contain data, and data can be of different data types, or types for short.
  • Loading branch information
dzvon committed Sep 21, 2018
commit ee78144d4c98db8e14c2844bbcfc59ffe6ce8128
2 changes: 1 addition & 1 deletion eBook/04.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ godoc 工具(第 3.6 节)会收集这些注释并产生一个技术文档。

## 4.2.4 类型

可以包含数据的变量(或常量),可以使用不同的数据类型或类型来保存数据。使用 var 声明的变量的值会自动初始化为该类型的零值。类型定义了某个变量的值的集合与可对其进行操作的集合。
变量(或常量)包含数据,这些数据可以有不同的数据类型,简称类型。使用 var 声明的变量的值会自动初始化为该类型的零值。类型定义了某个变量的值的集合与可对其进行操作的集合。

类型可以是基本类型,如:int、float、bool、string;结构化的(复合的),如:struct、array、slice、map、channel;只描述类型的行为的,如:interface。

Expand Down