move functions supporting rmi command to libkpod/image

Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
This commit is contained in:
Ryan Cole 2017-07-24 09:21:50 -04:00
parent 0f44ff1d3b
commit c1706475c0
6 changed files with 134 additions and 123 deletions

View file

@ -77,7 +77,7 @@ func ParseRegistryCreds(creds string) (*types.DockerAuthConfig, error) {
if creds == "" {
return nil, errors.New("no credentials supplied")
}
if strings.Index(creds, ":") < 0 {
if !strings.Contains(creds, ":") {
return nil, errors.New("user name supplied, but no password supplied")
}
v := strings.SplitN(creds, ":", 2)