From 014abbc41edebf35090a132ccc2b84c66c124345 Mon Sep 17 00:00:00 2001 From: naiba Date: Sat, 21 Oct 2023 18:13:38 +0800 Subject: [PATCH] fix gosec --- model/notification.go | 3 +-- service/singleton/notification.go | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/model/notification.go b/model/notification.go index f4d6edc..f3227f9 100644 --- a/model/notification.go +++ b/model/notification.go @@ -117,9 +117,8 @@ func (ns *NotificationServerBundle) Send(message string) error { verifySSL = true } - /* #nosec */ transCfg := &http.Transport{ - TLSClientConfig: &tls.Config{InsecureSkipVerify: verifySSL}, + TLSClientConfig: &tls.Config{InsecureSkipVerify: verifySSL}, // #nosec G402 } client := &http.Client{Transport: transCfg, Timeout: time.Minute * 10} diff --git a/service/singleton/notification.go b/service/singleton/notification.go index 56978d1..afc14cd 100644 --- a/service/singleton/notification.go +++ b/service/singleton/notification.go @@ -1,8 +1,6 @@ package singleton import ( - // #nosec - "fmt" "log" "sync"