func IsErrNotFound(err error) bool {
	te, ok := err.(notFound)
	return ok && te.NotFound()
}
IsErrNotFound returns true if the error is a NotFound error, which is returned
by the API when some object is not found.
package client  
import (
	"fmt"
	"net/http"
	"github.com/docker/docker/api/types/versions"
	"github.com/pkg/errors"
)
type errConnectionFailed struct {
	host string
}
func (err errConnectionFailed) Error() string {
	if err.host == "" {
		return "Cannot connect to the Docker daemon. Is the docker daemon running on this host?"
	}
	return fmt.Sprintf("Cannot connect to the Docker daemon at %s. Is the docker daemon running?", err.host)
}
func IsErrConnectionFailed(err error) bool {
	_, ok := errors.Cause(err).(errConnectionFailed)
	return ok
}
func ErrorConnectionFailed(host string) error {
	return errConnectionFailed{host: host}
}
type notFound interface {
	error
	NotFound() bool  
}