fix go vet issues

This commit is contained in:
Andrew Martinez
2020-10-28 07:51:19 -04:00
parent 7543eac233
commit 2a27850097
4 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -39,6 +39,6 @@ var verbose bool
func Execute() {
if err := root.Execute(); err != nil {
fmt.Errorf("error: %s", err)
println(fmt.Errorf("error: %s", err))
}
}
+1 -1
View File
@@ -41,6 +41,6 @@ var verbose bool
func Execute() {
if err := Root.Execute(); err != nil {
fmt.Errorf("error: %s", err)
println(fmt.Errorf("error: %s", err))
}
}
+1 -1
View File
@@ -142,7 +142,7 @@ func (p *probe) run(_ *cobra.Command, args []string) {
for {
if _, err = p.ctx.GetServices(); err != nil {
sleepDuration := 5 * time.Second
log.Error("failed to load available services, try again in %.2f seconds: %v", sleepDuration.Seconds(), err)
log.Errorf("failed to load available services, try again in %.2f seconds: %v", sleepDuration.Seconds(), err)
time.Sleep(sleepDuration)
} else {
break
@@ -502,8 +502,6 @@ func runCreatePostureCheckOs(o *createPostureCheckOsOptions) error {
panic(err)
}
return err
return nil
}
@@ -536,5 +534,4 @@ func parseOsSpec(osSpecStr string) (*osSpec, error) {
Type: osType,
Versions: cleanVersions,
}, nil
}