mirror of
https://github.com/containers/podman.git
synced 2025-06-28 22:53:21 +08:00
Change to correct break statements
Signed-off-by: Jakob Tigerström <jakob.tigerstrom@gmail.com>
This commit is contained in:
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user