Fix go vet errors

This commit is contained in:
nemunaire 2022-07-08 23:11:11 +02:00
parent b0129e5239
commit e84b1d67cb
8 changed files with 16 additions and 12 deletions

View file

@ -333,7 +333,7 @@ func getTeamP12File(c *gin.Context) {
return
} else if fd, err := os.Open(pki.ClientP12Path(cert.Id)); err != nil {
log.Println("Unable to open ClientP12Path:", err.Error())
c.AbortWithError(http.StatusInternalServerError, fmt.Errorf("Unable to open the p12: %w", err.Error()))
c.AbortWithError(http.StatusInternalServerError, fmt.Errorf("Unable to open the p12: %w", err))
return
} else {
defer fd.Close()
@ -341,7 +341,7 @@ func getTeamP12File(c *gin.Context) {
data, err := ioutil.ReadAll(fd)
if err != nil {
log.Println("Unable to open ClientP12Path:", err.Error())
c.AbortWithError(http.StatusInternalServerError, fmt.Errorf("Unable to open the p12: %w", err.Error()))
c.AbortWithError(http.StatusInternalServerError, fmt.Errorf("Unable to open the p12: %w", err))
return
}