mirror of
https://github.com/genuinetools/reg.git
synced 2024-05-20 03:58:32 -04:00
cleanup staticcheck errors
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
76c9404739
commit
e3777763fb
|
@ -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
|
||||
|
|
|
@ -230,8 +230,6 @@ func (rc *registryController) vulnerabilitiesHandler(w http.ResponseWriter, r *h
|
|||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
result := clair.VulnerabilityReport{}
|
||||
|
|
|
@ -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, ":") {
|
||||
|
|
Loading…
Reference in a new issue