From b708f1d815ae6380e37979d25af00c44997c873b Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Wed, 25 May 2022 16:01:57 -0700 Subject: [PATCH] use log over fmt --- controllers/authController.go | 7 ++++--- controllers/{mailerController.go => emailController.go} | 0 2 files changed, 4 insertions(+), 3 deletions(-) rename controllers/{mailerController.go => emailController.go} (100%) diff --git a/controllers/authController.go b/controllers/authController.go index fd183b5..c7808d2 100644 --- a/controllers/authController.go +++ b/controllers/authController.go @@ -4,6 +4,7 @@ import ( "bufio" "context" "fmt" + "log" "os" "strings" "time" @@ -69,11 +70,11 @@ func NewSystem() { _, insertErr := adminCollection.InsertOne(context.Background(), admin) if insertErr != nil { - fmt.Print("Failed to create admin") + log.Printf("Failed to create an admin\n") } - fmt.Println("Successfully created system admin") - fmt.Println("Your admin ID is ", aid) + log.Printf("Successfully created default admin") + log.Printf("Your default admin ID is %s", aid) } } diff --git a/controllers/mailerController.go b/controllers/emailController.go similarity index 100% rename from controllers/mailerController.go rename to controllers/emailController.go