From 6ea4d2c82de80efc87708e5e182034b7c6c2019e Mon Sep 17 00:00:00 2001 From: Gibheer Date: Thu, 5 Sep 2024 19:38:25 +0200 Subject: switch from github.com/lib/pq to github.com/jackc/pgx/v5 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. --- cmd/monfront/checks.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cmd/monfront/checks.go') 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{"/"} -- cgit v1.2.3-70-g09d2