remove a period at the end of error messages.

This commit is contained in:
kota kanbe
2016-04-10 19:08:46 +09:00
parent 57ef45ebcd
commit 1a943776c3
11 changed files with 21 additions and 21 deletions

View File

@@ -346,7 +346,7 @@ func (o *debian) fillCandidateVersion(packs []models.PackageInfo) ([]models.Pack
case err := <-errChan:
return nil, err
case <-timeout:
return nil, fmt.Errorf("Timeout fillCandidateVersion.")
return nil, fmt.Errorf("Timeout fillCandidateVersion")
}
}
return result, nil
@@ -500,7 +500,7 @@ func (o *debian) scanPackageCveInfos(unsecurePacks []models.PackageInfo) (cvePac
return nil, err
}
case <-timeout:
return nil, fmt.Errorf("Timeout scanPackageCveIds.")
return nil, fmt.Errorf("Timeout scanPackageCveIds")
}
}

View File

@@ -199,7 +199,7 @@ util-linux (2.26.2-6) unstable; urgency=medium`,
for _, tt := range tests {
_, err := d.getCveIDParsingChangelog(tt.in[2], tt.in[0], "version number do'nt match case")
if err != nil {
t.Errorf("Returning error is unexpected.")
t.Errorf("Returning error is unexpected")
}
}
}
@@ -504,7 +504,7 @@ Calculating upgrade... Done
for _, tt := range tests {
actual, err := d.parseAptGetUpgrade(tt.in)
if err != nil {
t.Errorf("Returning error is unexpected.")
t.Errorf("Returning error is unexpected")
}
if len(tt.expected) != len(actual) {
t.Errorf("Result length is not as same as expected. expected: %d, actual: %d", len(tt.expected), len(actual))

View File

@@ -160,7 +160,7 @@ func (o *redhat) installYumChangelog() error {
cmd := "rpm -q " + packName
if r := o.ssh(cmd, noSudo); r.isSuccess() {
o.log.Infof("Ignored: %s already installed.", packName)
o.log.Infof("Ignored: %s already installed", packName)
return nil
}
@@ -170,7 +170,7 @@ func (o *redhat) installYumChangelog() error {
"Failed to install %s. status: %d, stdout: %s, stderr: %s",
packName, r.ExitStatus, r.Stdout, r.Stderr)
}
o.log.Infof("Installed: %s.", packName)
o.log.Infof("Installed: %s", packName)
}
return nil
}

View File

@@ -130,7 +130,7 @@ func detectServersOS() (osi []osTypeInterface, err error) {
case res := <-osTypeChan:
osi = append(osi, res)
case <-timeout:
Log.Error("Timeout occured while detecting OS.")
Log.Error("Timeout occured while detecting OS")
err = fmt.Errorf("Timeout!")
return
}
@@ -151,7 +151,7 @@ func Prepare() []error {
// Scan scan
func Scan() []error {
if len(servers) == 0 {
return []error{fmt.Errorf("Not initialized yet.")}
return []error{fmt.Errorf("Not initialized yet")}
}
Log.Info("Check required packages for scanning...")
@@ -201,7 +201,7 @@ func GetScanResults() (results models.ScanResults, err error) {
for _, s := range servers {
r, err := s.convertToModel()
if err != nil {
return results, fmt.Errorf("Failed converting to model: %s.", err)
return results, fmt.Errorf("Failed converting to model: %s", err)
}
results = append(results, r)
}

View File

@@ -94,11 +94,11 @@ func parallelSSHExec(fn func(osTypeInterface) error, timeoutSec ...int) (errs []
if err != nil {
errs = append(errs, err)
} else {
logrus.Debug("Parallel SSH Success.")
logrus.Debug("Parallel SSH Success")
}
case <-time.After(time.Duration(timeout) * time.Second):
logrus.Errorf("Parallel SSH Timeout.")
errs = append(errs, fmt.Errorf("Timed out!"))
logrus.Errorf("Parallel SSH Timeout")
errs = append(errs, fmt.Errorf("Timed out"))
}
}
return