chore: replace fmt

This commit is contained in:
Daan Selen
2025-11-24 19:59:52 +01:00
parent 8742dd209a
commit 389e208cd7

12
main.go
View File

@@ -3,7 +3,6 @@ package main
import (
"crypto/x509"
"encoding/pem"
"fmt"
"log"
"os"
certpair "pkcs-generator/modules/certpairs"
@@ -111,7 +110,8 @@ func main() {
}
if !allPresent {
fmt.Println("One or more files missing!")
grid.SetText("One or more files missing!")
log.Println("One or more files missing!")
return
}
@@ -157,7 +157,7 @@ func main() {
})
cancelBtn := widget.NewButton("Exit", func() {
fmt.Println("Quitting...")
log.Println("Quitting...")
os.Exit(0)
})
@@ -194,7 +194,7 @@ func main() {
func readFile(path string) []byte {
rawData, err := os.ReadFile(path)
if err != nil {
fmt.Printf("Error reading contents of %s, %e", path, err)
log.Printf("Error reading contents of %s, %e", path, err)
return nil
} else {
return rawData
@@ -230,12 +230,12 @@ func parseX509(certData []byte) *x509.Certificate {
func integrityCheckAndGo(keyPath, certPath, caRootString, caCertString string) (string, []byte) {
if _, err := os.Stat(keyPath); err != nil {
fmt.Printf("Error checking Private Keyfile, %e", err)
log.Printf("Error checking Private Keyfile, %e", err)
return "Error...", nil
}
if _, err := os.Stat(certPath); err != nil {
fmt.Printf("Error checking Certificate file, %e", err)
log.Printf("Error checking Certificate file, %e", err)
return "Error...", nil
}