diff options
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/container_kill.go')
-rw-r--r-- | vendor/github.com/fsouza/go-dockerclient/container_kill.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/container_kill.go b/vendor/github.com/fsouza/go-dockerclient/container_kill.go index ee9f0418f..600c58f12 100644 --- a/vendor/github.com/fsouza/go-dockerclient/container_kill.go +++ b/vendor/github.com/fsouza/go-dockerclient/container_kill.go @@ -2,6 +2,7 @@ package docker import ( "context" + "errors" "net/http" ) @@ -27,8 +28,8 @@ func (c *Client) KillContainer(opts KillContainerOptions) error { path := "/containers/" + opts.ID + "/kill" + "?" + queryString(opts) resp, err := c.do(http.MethodPost, path, doOptions{context: opts.Context}) if err != nil { - e, ok := err.(*Error) - if !ok { + var e *Error + if !errors.As(err, &e) { return err } switch e.Status { |