Control Structures
There are only a few control structures in Go. To write loops we use the for
keyword, and there is a switch
and of course an if
. When working withchannels select
will be used (see ). Parentheses are notrequired around the condition, and the body must always be brace-delimited.
当前内容版权归 Miek Gieben 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Miek Gieben .