• Required: When two statements are on the same line
必备: 当两个语句在同一行时
var i = 0; i++ // <-- semicolon obligatory
// (but optional before newline)
var i = 0 // <-- semicolon optional
i++ // <-- semicolon optional
• Optional: After statement
Rules
This document contains a description of all rules, what they are checking for,
as well as an examples of documents that break the rule and corrected
versions of the examples. Any rule whose heading is struck through is
deprecated, but still provided for backward-compatibility.
<a name="md001">
MyCLI is a command line interface for MySQL, MariaDB, and Percona with auto-completion and syntax highlighting.
Mycli 是 MySQL、 MariaDB 和 Percona 的命令行界面,具有自动补全和语法突显。
Go 是一个开源的编程语言,它能让构造简单、可靠且高效的软件变得容易。
Go是从2007年末由Robert Griesemer, Rob Pike, Ken Thompson主持开发,后来还加入了Ian Lance Taylor, Russ Cox等人,并最终于2009年11月开源,在2012年早些时候发布了Go 1稳定版本。现在Go的开发已经是完全开放的,并且拥有一个活跃的社区。
go 的关键字
下面列举了 Go 代码中会使用到的 25 个关键字或保留字:
break default func interface select
case defer go map struct
chan else goto package switch
const fallthrough if range type
continue for import return var