Skip to content

Commit

Permalink
Merge pull request #168 from Icinga/minor-suggestions
Browse files Browse the repository at this point in the history
Minor suggestions
  • Loading branch information
lippserd authored Jan 20, 2025
2 parents f5e8867 + 0c2f862 commit 3b81ab4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/icinga-kubernetes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"flag"
"fmt"
_ "github.com/go-sql-driver/mysql"
"github.com/google/uuid"
"github.com/icinga/icinga-go-library/backoff"
Expand Down Expand Up @@ -154,7 +155,9 @@ func main() {
if err != nil {
klog.Fatal(err)
}
defer rows.Close()
defer func() {
_ = rows.Close()
}()

dbLog.Info("Dropping schema")

Expand All @@ -164,7 +167,7 @@ func main() {
klog.Fatal(err)
}

_, err := kdb.Exec("DROP TABLE " + tableName)
_, err := kdb.Exec(fmt.Sprintf(`DROP TABLE %s`, tableName))
if err != nil {
klog.Fatal(err)
}
Expand Down

0 comments on commit 3b81ab4

Please sign in to comment.