Skip to content

Commit 3f7f2c2

Browse files
Fixed formatting of variables.
1 parent bed6042 commit 3f7f2c2

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

chapter7/patterns/runner/main/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ func main() {
3232
if err := r.Start(); err != nil {
3333
switch err {
3434
case runner.ErrTimeout:
35-
log.Println("Terminating Due To Timeout.")
35+
log.Println("Terminating due to timeout.")
3636
os.Exit(1)
3737
case runner.ErrInterrupt:
38-
log.Println("Terminating Due To Interrupt.")
38+
log.Println("Terminating due to interrupt.")
3939
os.Exit(2)
4040
}
4141
}
4242

43-
log.Println("Process Ended")
43+
log.Println("Process ended.")
4444
}
4545

4646
// createTask returns an example task that sleeps for the specified
4747
// number of seconds based on the id.
4848
func createTask() func(int) {
4949
return func(id int) {
50-
log.Printf("Processor - Task #%d", id)
50+
log.Printf("Processor - Task #%d.", id)
5151
time.Sleep(time.Duration(id) * time.Second)
5252
}
5353
}

chapter7/patterns/runner/runner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ type Runner struct {
3030
}
3131

3232
// ErrTimeout is returned when a value is received on the timeout channel.
33-
var ErrTimeout = errors.New("received timeout.")
33+
var ErrTimeout = errors.New("received timeout")
3434

3535
// ErrInterrupt is returned when an event from the OS is received.
36-
var ErrInterrupt = errors.New("received interrupt.")
36+
var ErrInterrupt = errors.New("received interrupt")
3737

3838
// New returns a new ready-to-use Runner.
3939
func New(d time.Duration) *Runner {

0 commit comments

Comments
 (0)