diff options
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/container_changes.go')
-rw-r--r-- | vendor/github.com/fsouza/go-dockerclient/container_changes.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_changes.go b/vendor/github.com/fsouza/go-dockerclient/container_changes.go index 42b6f4a5c..48835e231 100644 --- a/vendor/github.com/fsouza/go-dockerclient/container_changes.go +++ b/vendor/github.com/fsouza/go-dockerclient/container_changes.go @@ -2,6 +2,7 @@ package docker import ( "encoding/json" + "errors" "net/http" ) @@ -12,7 +13,8 @@ func (c *Client) ContainerChanges(id string) ([]Change, error) { path := "/containers/" + id + "/changes" resp, err := c.do(http.MethodGet, path, doOptions{}) if err != nil { - if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound { + var e *Error + if errors.As(err, &e) && e.Status == http.StatusNotFound { return nil, &NoSuchContainer{ID: id} } return nil, err |