fix: nil pointer dereference error when in debug mode

This commit is contained in:
Simon Cornet 2025-03-06 10:02:43 +01:00
commit fee0eaaed7
6 changed files with 86 additions and 42 deletions

View file

@ -32,7 +32,7 @@ func progressBar() {
)
// initialize progressbar
logging.Print(debug, "Initialize progressbar", nil)
logging.Print("Initialize progressbar", nil)
err := bar.RenderBlank()
progressBarAdd(1)
if err != nil {
@ -42,7 +42,7 @@ func progressBar() {
func progressBarAdd(amount int) {
if err := bar.Add(amount); err != nil {
logging.Print(debug, "ERROR: Progress bar update error: %v\n", err)
logging.Print("ERROR: Progress bar update error: %v\n", err)
}
}