Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix_misuse_of_logger_function #478

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions teamserver/pkg/common/certs/https.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func generateCertificate(caType string, subject pkix.Name, isCA bool, isClient b

if certErr != nil {
// We maybe don't want this to be fatal, but it should basically never happen afaik
logger.Fatal(fmt.Sprintf("Failed to create certificate: %s", certErr))
logger.Fatal(fmt.Sprintf("Failed to create certificate: %s", certErr.Error()))
}

// Encode certificate and key
Expand All @@ -306,7 +306,7 @@ func HTTPSGenerateRSACertificate(host string) ([]byte, []byte, error) {
// Generate private key
privateKey, err = rsa.GenerateKey(rand.Reader, RSAKeySize)
if err != nil {
logger.Debug("Failed to generate private key %s", err)
logger.Debug("Failed to generate private key: " + err.Error())
return nil, nil, err
}
subject := randomSubject(host)
Expand Down