Commit 98e5fe72 authored by Tomasz Maczukin's avatar Tomasz Maczukin 🌴

Fix violations reported by new golint version

parent 6cb9b733
......@@ -823,7 +823,7 @@ func (s *executor) getImageName() (string, error) {
}
if s.Config.Docker.Image == "" {
return "", errors.New("No Docker image specified to run the build in.")
return "", errors.New("No Docker image specified to run the build in")
}
return s.Config.Docker.Image, nil
......
......@@ -35,8 +35,7 @@ const (
func PrlctlOutput(args ...string) (string, error) {
if runtime.GOOS != "darwin" {
return "", fmt.Errorf(
"Parallels works only on \"darwin\" platform!")
return "", fmt.Errorf("Parallels works only on \"darwin\" platform")
}
var stdout, stderr bytes.Buffer
......@@ -196,7 +195,7 @@ func Mac(vmName string) (string, error) {
macMatch := re.FindAllStringSubmatch(stdoutString, 1)
if len(macMatch) != 1 {
return "", fmt.Errorf("MAC address for NIC: nic0 on Virtual Machine: %s not found!\n", vmName)
return "", fmt.Errorf("MAC address for NIC: nic0 on Virtual Machine: %s not found", vmName)
}
mac := macMatch[0][1]
......@@ -213,7 +212,7 @@ func Mac(vmName string) (string, error) {
// IP Address ="Lease expiry, Lease time, MAC, MAC or DUID"
func IPAddress(mac string) (string, error) {
if len(mac) != 12 {
return "", fmt.Errorf("Not a valid MAC address: %s. It should be exactly 12 digits.", mac)
return "", fmt.Errorf("Not a valid MAC address: %s. It should be exactly 12 digits", mac)
}
leases, err := ioutil.ReadFile(dhcpLeases)
......@@ -236,7 +235,7 @@ func IPAddress(mac string) (string, error) {
}
if len(mostRecentIP) == 0 {
return "", fmt.Errorf("IP lease not found for MAC address %s in: %s\n", mac, dhcpLeases)
return "", fmt.Errorf("IP lease not found for MAC address %s in: %s", mac, dhcpLeases)
}
logrus.Debugf("Found IP lease: %s for MAC address %s\n", mostRecentIP, mac)
......
......@@ -10,7 +10,7 @@ import (
var (
// ErrNotSupported is returned when specific feature is not supported.
ErrNotSupported = errors.New("Not supported.")
ErrNotSupported = errors.New("Not supported")
)
type SimpleService struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment