瀏覽代碼

No longer need to ignore context warnings when context in request

- after upgrade to golangci-lint 1.50.0
max furman 4 年之前
父節點
當前提交
66858a3870
共有 3 個文件被更改,包括 0 次插入 和 3 次删除
  1. 0 1
      api/renew.go
  2. 0 1
      api/sshRekey.go
  3. 0 1
      api/sshRenew.go

+ 0 - 1
api/renew.go

@@ -17,7 +17,6 @@ const (
 // Renew uses the information of certificate in the TLS connection to create a
 // Renew uses the information of certificate in the TLS connection to create a
 // new one.
 // new one.
 func Renew(w http.ResponseWriter, r *http.Request) {
 func Renew(w http.ResponseWriter, r *http.Request) {
-	//nolint:contextcheck // the reqest has the context
 	cert, err := getPeerCertificate(r)
 	cert, err := getPeerCertificate(r)
 	if err != nil {
 	if err != nil {
 		render.Error(w, err)
 		render.Error(w, err)

+ 0 - 1
api/sshRekey.go

@@ -83,7 +83,6 @@ func SSHRekey(w http.ResponseWriter, r *http.Request) {
 	notBefore := time.Unix(int64(oldCert.ValidAfter), 0)
 	notBefore := time.Unix(int64(oldCert.ValidAfter), 0)
 	notAfter := time.Unix(int64(oldCert.ValidBefore), 0)
 	notAfter := time.Unix(int64(oldCert.ValidBefore), 0)
 
 
-	//nolint:contextcheck // the reqest has the context
 	identity, err := renewIdentityCertificate(r, notBefore, notAfter)
 	identity, err := renewIdentityCertificate(r, notBefore, notAfter)
 	if err != nil {
 	if err != nil {
 		render.Error(w, errs.ForbiddenErr(err, "error renewing identity certificate"))
 		render.Error(w, errs.ForbiddenErr(err, "error renewing identity certificate"))

+ 0 - 1
api/sshRenew.go

@@ -75,7 +75,6 @@ func SSHRenew(w http.ResponseWriter, r *http.Request) {
 	notBefore := time.Unix(int64(oldCert.ValidAfter), 0)
 	notBefore := time.Unix(int64(oldCert.ValidAfter), 0)
 	notAfter := time.Unix(int64(oldCert.ValidBefore), 0)
 	notAfter := time.Unix(int64(oldCert.ValidBefore), 0)
 
 
-	//nolint:contextcheck // the reqest has the context
 	identity, err := renewIdentityCertificate(r, notBefore, notAfter)
 	identity, err := renewIdentityCertificate(r, notBefore, notAfter)
 	if err != nil {
 	if err != nil {
 		render.Error(w, errs.ForbiddenErr(err, "error renewing identity certificate"))
 		render.Error(w, errs.ForbiddenErr(err, "error renewing identity certificate"))