mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...)
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
This commit is contained in:
		@@ -169,7 +169,7 @@ func (c *MesosCloud) Master(clusterName string) (string, error) {
 | 
				
			|||||||
			return host, nil
 | 
								return host, nil
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return "", errors.New(fmt.Sprintf("The supplied cluster '%v' does not exist", clusterName))
 | 
						return "", fmt.Errorf("The supplied cluster '%v' does not exist", clusterName)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ipAddress returns an IP address of the specified instance.
 | 
					// ipAddress returns an IP address of the specified instance.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -125,7 +125,7 @@ func (util *ISCSIUtil) AttachDisk(b iscsiDiskMounter) error {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		if iscsiTransport == "" {
 | 
							if iscsiTransport == "" {
 | 
				
			||||||
			glog.Errorf("iscsi: could not find transport name in iface %s", b.iface)
 | 
								glog.Errorf("iscsi: could not find transport name in iface %s", b.iface)
 | 
				
			||||||
			return errors.New(fmt.Sprintf("Could not parse iface file for %s", b.iface))
 | 
								return fmt.Errorf("Could not parse iface file for %s", b.iface)
 | 
				
			||||||
		} else if iscsiTransport == "tcp" {
 | 
							} else if iscsiTransport == "tcp" {
 | 
				
			||||||
			devicePath = strings.Join([]string{"/dev/disk/by-path/ip", tp, "iscsi", b.iqn, "lun", b.lun}, "-")
 | 
								devicePath = strings.Join([]string{"/dev/disk/by-path/ip", tp, "iscsi", b.iqn, "lun", b.lun}, "-")
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,7 +20,6 @@ import (
 | 
				
			|||||||
	"bytes"
 | 
						"bytes"
 | 
				
			||||||
	"context"
 | 
						"context"
 | 
				
			||||||
	"encoding/json"
 | 
						"encoding/json"
 | 
				
			||||||
	"errors"
 | 
					 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"io"
 | 
						"io"
 | 
				
			||||||
	"io/ioutil"
 | 
						"io/ioutil"
 | 
				
			||||||
@@ -1837,7 +1836,7 @@ func getUDData(jpgExpected string, ns string) func(clientset.Interface, string)
 | 
				
			|||||||
		if strings.Contains(data.Image, jpgExpected) {
 | 
							if strings.Contains(data.Image, jpgExpected) {
 | 
				
			||||||
			return nil
 | 
								return nil
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			return errors.New(fmt.Sprintf("data served up in container is inaccurate, %s didn't contain %s", data, jpgExpected))
 | 
								return fmt.Errorf("data served up in container is inaccurate, %s didn't contain %s", data, jpgExpected)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -82,7 +82,7 @@ func check(options ...string) []error {
 | 
				
			|||||||
			errs = appendNotNil(errs, kernel())
 | 
								errs = appendNotNil(errs, kernel())
 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
			fmt.Printf("Unrecognized option %s", c)
 | 
								fmt.Printf("Unrecognized option %s", c)
 | 
				
			||||||
			errs = append(errs, errors.New(fmt.Sprintf("Unrecognized option %s", c)))
 | 
								errs = append(errs, fmt.Errorf("Unrecognized option %s", c))
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return errs
 | 
						return errs
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user