go 语言之禅
Each package fulfils a single purpose 每个包都实现一个目的 A well designed Go package provides a single idea, a set of related behaviours. A good Go package starts by choosing a good name. Think of your package’s name as an elevator pitch to describe what it provides, using just one word. 一个设计良好的 Go 包提供了一个单一的想法,一组相关的行为。一个好的 Go 包首先要选择一个好名字。将您的软件包名称视为一种电梯推销,仅使用一个词来描述它所提供的内容。 Handle errors explicitly 明确地处理错误 Robust programs are composed from pieces that handle the failure cases before they pat themselves on the back....