cleanup staticcheck errors

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2017-12-11 13:39:02 -05:00
parent 76c9404739
commit e3777763fb
No known key found for this signature in database
GPG key ID: 18F3685C0022BFF3
3 changed files with 4 additions and 3 deletions

View file

@ -135,6 +135,9 @@ func (r *Registry) Token(url string) (string, error) {
}
authReq, err := a.Request(r.Username, r.Password)
if err != nil {
return "", err
}
resp, err = r.Client.Do(authReq)
if err != nil {
return "", err

View file

@ -230,8 +230,6 @@ func (rc *registryController) vulnerabilitiesHandler(w http.ResponseWriter, r *h
w.WriteHeader(http.StatusInternalServerError)
return
}
break
}
result := clair.VulnerabilityReport{}

View file

@ -68,7 +68,7 @@ func GetRepoAndRef(c *cli.Context) (repo, ref string, err error) {
}
arg := c.Args()[0]
parts := []string{}
var parts []string
if strings.Contains(arg, "@") {
parts = strings.Split(c.Args()[0], "@")
} else if strings.Contains(arg, ":") {