aboutsummaryrefslogtreecommitdiff
path: root/cmd/monfront/checks.go
diff options
context:
space:
mode:
authorGibheer <gibheer+git@zero-knowledge.org>2024-09-05 19:38:25 +0200
committerGibheer <gibheer+git@zero-knowledge.org>2024-09-05 19:38:25 +0200
commit6ea4d2c82de80efc87708e5e182034b7c6c2019e (patch)
tree35c0856a929040216c82153ca62d43b27530a887 /cmd/monfront/checks.go
parent6f64eeace1b66639b9380b44e88a8d54850a4306 (diff)
switch from github.com/lib/pq to github.com/jackc/pgx/v5HEAD20240905master
lib/pq is out of maintenance for some time now, so switch to the newer more active library. Looks like it finally stabilized after a long time.
Diffstat (limited to 'cmd/monfront/checks.go')
-rw-r--r--cmd/monfront/checks.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/cmd/monfront/checks.go b/cmd/monfront/checks.go
index e6668fd..75af748 100644
--- a/cmd/monfront/checks.go
+++ b/cmd/monfront/checks.go
@@ -4,8 +4,6 @@ import (
"database/sql"
"net/http"
"time"
-
- "github.com/lib/pq"
)
type (
@@ -62,7 +60,7 @@ type (
State int
Output string
Inserted time.Time
- Sent pq.NullTime
+ Sent sql.NullTime
NotifierName string
MappingId int
}
@@ -91,7 +89,7 @@ func showCheck(con *Context) {
err := DB.QueryRow(query, id[0]).Scan(&cd.Id, &cd.Name, &cd.Message, &cd.Enabled,
&cd.Updated, &cd.LastRefresh, &cd.MappingId, &cd.MappingName, &cd.NodeId,
&cd.NodeName, &cd.NodeMessage, &cd.CommandId, &cd.CommandName, &cd.CommandMessage,
- pq.Array(&cd.CommandLine), pq.Array(&cd.States), &cd.Notice, &cd.NextTime,
+ &cd.CommandLine, &cd.States, &cd.Notice, &cd.NextTime,
&cd.CheckerID, &cd.CheckerName, &cd.CheckerMsg)
if err != nil && err == sql.ErrNoRows {
con.w.Header()["Location"] = []string{"/"}