// Version returns the Docker API version and whether it is a Red Hat distro version
Version returns the Docker API version and whether it is a Red Hat distro version
// Version returns the Docker API version and whether it is a Red Hat distro version
func (h *Helper) APIVersion() (*types.Version, error) {
	glog.V(5).Infof("Retrieving Docker version")
	version, err := h.client.ServerVersion()
	if err != nil {
		glog.V(2).Infof("Error retrieving version: %v", err)
		return nil, err
	}
	glog.V(5).Infof("Docker version results: %#v", version)
	if len(version.APIVersion) == 0 {
		return nil, errors.New("did not get an API version")
	}
	return version, nil
}
func ( h * Helper ) APIVersion ( ) ( * types . Version , error ) { glog . V ( 5 ) . Infof ( " " ) version , err := h . client . ServerVersion ( ) if err != nil { glog . V ( 2 ) . Infof ( " " , err ) return nil , err } glog . V ( 5 ) . Infof ( " " , version ) if len ( version . APIVersion ) == 0 { return nil , errors . New ( " " ) } return version , nil }
Version returns the Docker API version and whether it is a Red Hat distro version
Version returns the Docker API version and whether it is a Red Hat distro version