首页  

GO箴言 goproverbs     所属分类 go 浏览量 338
Don't communicate by sharing memory, share memory by communicating.
不要通过共享内存进行通信,通过通信共享内存


Concurrency is not parallelism.
并发不是并行性


Channels orchestrate; mutexes serialize.

The bigger the interface, the weaker the abstraction.
接口越大,抽象就越弱


Make the zero value useful.

interface{} says nothing.

Gofmt's style is no one's favorite, yet gofmt is everyone's favorite.
Gofmt的风格不是人们最喜欢的,但gofmt是每个人的最爱


A little copying is better than a little dependency.
一点点复制比一点点依赖更好


Syscall must always be guarded with build tags.
系统调用必须始终使用构建标记进行保护


Cgo must always be guarded with build tags.
必须始终使用构建标记保护Cgo


Cgo is not Go.
Cgo不是Go


With the unsafe package there are no guarantees.
对于不安全的package,没有任何保证


Clear is better than clever.
清楚比聪明更好


Reflection is never clear.
反射永远不清晰


Errors are values.
错误即值

Don't just check errors, handle them gracefully.
不要只检查错误,还要优雅地处理它们

Design the architecture, name the components, document the details.
设计架构,命名组件,记录细节

Documentation is for users.
文档是供用户使用的


Don't panic.
不要恐慌


https://gitee.com/dyyx/hellocode/blob/master/web/tech/go/goproverbs/goproverbs/goproverbs.go https://github.com/wayneashleyberry/go-proverbs/blob/master/go-proverbs.go

上一篇     下一篇
国货飞跃

go程序设计语言01_05入门之获取URL

go程序设计语言01_06入门之并发获取多个URL

简洁的GO语言

GO多线程异步处理实例

go channel 实例