A Tour of Go
首页
白天
夜间
下载
阅读记录
书签管理
我的书签
添加书签
移除书签
编辑文档
Flow control statements: for, if, else, switch and defer
来源 1
浏览
649
扫码
打印
2020-02-11 08:54:31
Flow control statements: for, if, else, switch and defer
上一篇:
下一篇:
发布点评
Packages, variables, and functions.
Packages
Short variable declarations
Basic types
Zero values
Type conversions
Type inference
Constants
Numeric Constants
Congratulations!
Imports
Exported names
Functions
Functions continued
Multiple results
Named return values
Variables
Variables with initializers
Concurrency
Goroutines
Exercise: Web Crawler
Where to Go from here...
Channels
Buffered Channels
Range and Close
Select
Default Selection
Exercise: Equivalent Binary Trees
Exercise: Equivalent Binary Trees
sync.Mutex
Flow control statements: for, if, else, switch and defer
For
Switch evaluation order
Switch with no condition
Defer
Stacking defers
Congratulations!
For continued
For is Go's "while"
Forever
If
If with a short statement
If and else
Exercise: Loops and Functions
Switch
Methods and interfaces
Methods
Interfaces are implemented implicitly
Interface values
Interface values with nil underlying values
Nil interface values
The empty interface
Type assertions
Type switches
Stringers
Exercise: Stringers
Errors
Methods are functions
Exercise: Errors
Readers
Exercise: Readers
Exercise: rot13Reader
Images
Exercise: Images
Congratulations!
Methods continued
Pointer receivers
Pointers and functions
Methods and pointer indirection
Methods and pointer indirection (2)
Choosing a value or pointer receiver
Interfaces
More types: structs, slices, and maps.
Pointers
Slice defaults
Slice length and capacity
Nil slices
Creating a slice with make
Slices of slices
Appending to a slice
Range
Range continued
Exercise: Slices
Maps
Structs
Map literals
Map literals continued
Mutating Maps
Exercise: Maps
Function values
Function closures
Exercise: Fibonacci closure
Congratulations!
Struct Fields
Pointers to structs
Struct Literals
Arrays
Slices
Slices are like references to arrays
Slice literals
Introduction
Welcome!
Hello, 世界
Go local
Go offline (optional)
The Go Playground
Congratulations
暂无相关搜索结果!
本文档使用
全库网
构建
×
思维导图备注
×
文章二维码
手机扫一扫,轻松掌上读
×
文档下载
请下载您需要的格式的文档,随时随地,享受汲取知识的乐趣!
PDF
文档
EPUB
文档
MOBI
文档
×
书签列表
×
阅读记录
阅读进度:
0.00%
(
0/0
)
重置阅读进度