bump containers/image to v5.0.0, buildah to v1.11.4

Move to containers/image v5 and containers/buildah to v1.11.4.

Replace an equality check with a type assertion when checking for a
docker.ErrUnauthorizedForCredentials in `podman login`.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai
2019-10-24 10:37:22 -04:00
parent 59582c55b7
commit a4a70b4506
333 changed files with 10226 additions and 3551 deletions

View File

@ -8,6 +8,7 @@ import (
"context"
"encoding/json"
"net"
"net/http"
"strings"
"github.com/docker/docker/api/types/swarm"
@ -22,7 +23,7 @@ func (c *Client) Version() (*Env, error) {
// VersionWithContext returns version information about the docker server.
func (c *Client) VersionWithContext(ctx context.Context) (*Env, error) {
resp, err := c.do("GET", "/version", doOptions{context: ctx})
resp, err := c.do(http.MethodGet, "/version", doOptions{context: ctx})
if err != nil {
return nil, err
}
@ -37,6 +38,7 @@ func (c *Client) VersionWithContext(ctx context.Context) (*Env, error) {
// DockerInfo contains information about the Docker server
//
// See https://goo.gl/bHUoz9 for more details.
//nolint:golint
type DockerInfo struct {
ID string
Containers int
@ -162,7 +164,7 @@ type IndexInfo struct {
//
// See https://goo.gl/ElTHi2 for more details.
func (c *Client) Info() (*DockerInfo, error) {
resp, err := c.do("GET", "/info", doOptions{})
resp, err := c.do(http.MethodGet, "/info", doOptions{})
if err != nil {
return nil, err
}