From 77e055b2e0da5d76ca6651020f0eb990a6787e88 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sun, 26 Jan 2025 15:46:23 +0700 Subject: internal/cmd/gocheck: add internal static analyzers Instead of using binary fieldalignment and shadow, run them by creating command that call the same Analyzer internally. This analyzers help finding possible panic on httpd.go. --- httpd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httpd.go') diff --git a/httpd.go b/httpd.go index f42a2b3..a313893 100644 --- a/httpd.go +++ b/httpd.go @@ -1348,7 +1348,7 @@ func (srv *Server) apiZonedRRAdd(epr *libhttp.EndpointRequest) (resb []byte, err req.Type = strings.ToUpper(req.Type) req.rtype, ok = dns.RecordTypes[req.Type] if !ok { - res.Message = fmt.Sprintf("invalid or empty RR type %q: %s", req.Type, err.Error()) + res.Message = fmt.Sprintf(`invalid or empty RR type %q`, req.Type) return nil, &res } -- cgit v1.3