This repository was archived by the owner on Nov 22, 2020. It is now read-only.
Description Found a possible issue in RedHatInsights/insights-ocp-controller at vendor/github.com/RedHatInsights/insights-goapi/container/mount.go
The below snippet of Go code triggered static analysis which searches for goroutines and/or defer statements
which capture loop variables.
Click here to see the code in its original context.
Click here to show the 26 line(s) of Go which triggered the analyzer.
for name , auth := range imagePullAuths .Configs {
parsedErrors := make (chan error , 100 )
defer func () { close (parsedErrors ) }()
go func () {
reader , writer := io .Pipe ()
defer writer .Close ()
defer reader .Close ()
imagePullOption := docker.PullImageOptions {
Repository : i .opts .Image ,
OutputStream : writer ,
RawJSONStream : true ,
}
go decodeDockerResponse (parsedErrors , reader )
if err = client .PullImage (imagePullOption , auth ); err != nil {
parsedErrors <- err
}
}()
if parsedError := <- parsedErrors ; parsedError != nil {
log .Printf ("Authentication with %s failed: %v" , name , parsedError )
} else {
return nil
}
}
commit ID: 956e7a892c30bf6184e603f08701544be4b8541a
Reactions are currently unavailable
Found a possible issue in RedHatInsights/insights-ocp-controller at vendor/github.com/RedHatInsights/insights-goapi/container/mount.go
The below snippet of Go code triggered static analysis which searches for goroutines and/or defer statements
which capture loop variables.
Click here to see the code in its original context.
Click here to show the 26 line(s) of Go which triggered the analyzer.
commit ID: 956e7a892c30bf6184e603f08701544be4b8541a