Skip to content

Commit 7a01a51

Browse files
committed
Fix cast review comment.
1 parent 0f13224 commit 7a01a51

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ var times = flag.Int("config.scrape-times", 0, "how many times to scrape before
3838
func logError(err error) {
3939
if err != nil {
4040
if aerr, ok := err.(awserr.Error); ok {
41+
// Print the error, cast err to awserr.Error to get the Code and
42+
// Message from an error.
4143
switch aerr.Code() {
4244
case ecs.ErrCodeServerException:
4345
log.Println(ecs.ErrCodeServerException, aerr.Error())
@@ -51,8 +53,6 @@ func logError(err error) {
5153
log.Println(aerr.Error())
5254
}
5355
} else {
54-
// Print the error, cast err to awserr.Error to get the Code and
55-
// Message from an error.
5656
log.Println(err.Error())
5757
}
5858
}

0 commit comments

Comments
 (0)