Go学习例子(五)

21、Embedding

Go学习例子(五)

 

 

 

$ go run embedding.go
co={num: 1, str: some name}
also num: 1
describe: base with num=1
describer: base with num=1

22、Errors

Go学习例子(五)

 

 

$ go run errors.go
f1 worked: 10
f1 failed: can't work with 42
f2 worked: 10
f2 failed: 42 - can't work with it
42
can't work with it

23、Goroutines

Go学习例子(五)

 

 

$ go run goroutines.go
direct : 0
direct : 1
direct : 2
goroutine : 0
going
goroutine : 1
goroutine : 2
done

24、Channels

Go学习例子(五)

 

 

$ go run channels.go 
ping

25、Channel Buffering

Go学习例子(五)

 

 

$ go run channel-buffering.go 
buffered
channel
上一篇:42_Go基础_1_9 输入和输出


下一篇:QT笔记:QT 十六进制经纬度数据转IEEE-754浮点数据