fix: cosmetic changes on API log

main
Nilo Roberto C Paim 2023-10-24 18:39:27 -03:00
parent 1df3f1926c
commit a4da5c100a
1 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,6 @@ import (
"api/database"
"api/globals"
"api/routes"
"fmt"
"io"
"log"
"os"
@ -29,17 +28,19 @@ func main() {
mw := io.MultiWriter(os.Stdout, logFile)
log.SetOutput(mw)
log.Println("==================================================================")
// Get release type from command line
args := os.Args[1:]
if len(args) == 0 {
fmt.Printf("Missing release type\n")
log.Println("Missing release type")
return
}
// Load configurations for the release type
if !config.LoadConfigurations(args[0]) {
fmt.Printf("Invalid release type: %s\n", args[0])
log.Printf("Invalid release type: %s\n", args[0])
return
}