Change to correct break statements

Signed-off-by: Jakob Tigerström <jakob.tigerstrom@gmail.com>
This commit is contained in:
Jakob Tigerström
2022-10-11 22:59:39 +02:00
parent 8656ffa563
commit 783b4e914a
3 changed files with 5 additions and 3 deletions

View File

@ -69,6 +69,7 @@ func Pull(ctx context.Context, rawImage string, options *PullOptions) ([]string,
dec := json.NewDecoder(response.Body)
var images []string
var pullErrors []error
LOOP:
for {
var report entities.ImagePullReport
if err := dec.Decode(&report); err != nil {
@ -80,7 +81,7 @@ func Pull(ctx context.Context, rawImage string, options *PullOptions) ([]string,
select {
case <-response.Request.Context().Done():
break
break LOOP
default:
// non-blocking select
}

View File

@ -67,6 +67,7 @@ func Push(ctx context.Context, source string, destination string, options *PushO
}
dec := json.NewDecoder(response.Body)
LOOP:
for {
var report entities.ImagePushReport
if err := dec.Decode(&report); err != nil {
@ -78,7 +79,7 @@ func Push(ctx context.Context, source string, destination string, options *PushO
select {
case <-response.Request.Context().Done():
break
break LOOP
default:
// non-blocking select
}

View File

@ -199,7 +199,7 @@ func Push(ctx context.Context, name, destination string, options *images.PushOpt
select {
case <-response.Request.Context().Done():
break
return "", context.Canceled
default:
// non-blocking select
}