In this chapter, I describe the Go features for controlling the flow of execution. Go supports keywords that are common in other programming languages, such as
if,
for,
switch, etc., but each has some unusual and innovative features. Table
6-1 puts the Go flow control features in context.
Table 6-1Putting Flow Control in Context
Question | Answer |
---|
What is it? | Flow control allows a programmer to selectively execute statements. |
Why is it useful? | Without flow control, an application executes a series of code statements in sequence and then exits. Flow control allows ... |