Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Code improvement in function readErrorsFromChannel()#347

Merged
nkubala merged 1 commit into
GoogleContainerTools:masterfrom
nicolasdilley:patch-1
Feb 25, 2021
Merged

Code improvement in function readErrorsFromChannel()#347
nkubala merged 1 commit into
GoogleContainerTools:masterfrom
nicolasdilley:patch-1

Conversation

@nicolasdilley

Copy link
Copy Markdown
Contributor

I think there could be a code improvement in function readErrorsFromChannel

the for loop declared at line 88 simply behaves as a
for range

- for {
-		err, ok := <-c
-		if !ok {
-			break
-		}
-		errs = append(errs, err.Error())
-	}

+ for err := range c {
+	errs = append(errs, err.Error())
+}

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants