本部分内容基于CentOS 7
进行整理, 仅为记录;
Docker 初识
Docker
在前两年读研时经常会有实验室的师兄提起, 属于一直有所耳闻, 未曾深入了解的范畴. 目前在工作中, 发现Docker
是当前程序员必备技能之一, 公司微服务架构中,云计算的实现中,项目容器化的实践中 均使用Docker
作为实现工具. 所以需要对Docker
有一个基础而全面的认知才行. 这里以上述专栏为契机, 简单认识下Docker
.
GO_Learning_Fundamental_Data_Structure
- Reference: Go Chinese Docs, Bolg_1, Bolg_2 TDD
Go_Fundamental_Learning_Defer Function Call
Definition
defer
statement is the keyword of go language. defer
statement would delay the execution of function, method and anonymous method until the innermost call function return. Attention please, the arguments of defer function evaluate instantly while the execution is delay. Example is shown in the below part.
Go_Learning_Fundamental_Label in Go Land
- Reference: Go 101
Labels
in go is used in break
and continue
statement which is optional but it’s required in goto
statement. The scope of Labels
is the function where it’s declared.
Go_Fundamental_Learning_Basic Control Flow
Go_Fundamentall_Learning_Package import
Go_Fundamental_Learning_Build In Type And Literal Value
Go_Fundamental_Learning_Keyword_Identifiers
Keywords
keywords are original ideneifiers which help complier to understand and parse user code
Declare keywords
1
const, func, import, package, type, var
Type denotation keywords
1
chan, interface, map, struct
Control flow keywords
1
break, case, continue, default, else, fallthrough, for, goto, if, range, return, select, switch, defer, go
Idenfiers
Idenfiers ,defined by user, is used to idenfie something. Compose by : Unicode Letter , Unicode Number, Underscore _
;
Keywords can not be used as idenfiers
Idenfier
_
is a special idenfier, called blank idenfierExport (Public) identifier is start with upper case unicode Letter
1
2
3
4
5Player_9
DoSomething
VERSION
Ĝo
ΠUnExport (Private) identifier do not start with upper case unicode letter
1
2
3
4
5
6
7
8_
_status
memStat
book
π
一个类型
변수
エラillegal identifier
1
2
3
4
5
6
7
8
9
10
11
12
13
14// Starting with a Unicode digit.
123
3apples
// Containing Unicode characters not
// satisfying the requirements.
a.b
*ptr
$name
a@b.c
// These are keywords.
type
range