From d6203bce424e4f5312c4a7b973395390af9c18d0 Mon Sep 17 00:00:00 2001
From: Massimiliano Adamo <maxadamo@gmail.com>
Date: Thu, 23 Jan 2025 14:51:35 +0100
Subject: [PATCH] fix: improve error message formatting and enhance comments
 for clarity

---
 main.go | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/main.go b/main.go
index ccbe0ae..855ce35 100644
--- a/main.go
+++ b/main.go
@@ -216,14 +216,13 @@ Options:
 
 	cfg, err := ini.Load("/root/.acme.ini")
 	if err != nil {
-		fmt.Printf("Fail to read file: %v", err)
+		fmt.Printf("Fail to read file: %v\n", err)
 		os.Exit(1)
 	}
 	bearerToken = cfg.Section("acme").Key("bearer_token").String()
-	// remove leading and trailing spaces and quotes and split by comma
 	acmeProvidersRaw := cfg.Section("acme").Key("acme_providers").String()
-	acmeProvidersRaw = strings.Trim(acmeProvidersRaw, "[] ")
-	acmeProviders := strings.Split(acmeProvidersRaw, ",")
+	acmeProvidersRaw = strings.Trim(acmeProvidersRaw, "[] ") // remove leading and trailing brackets and spaces
+	acmeProviders := strings.Split(acmeProvidersRaw, ",")    // split by comma
 	for i := range acmeProviders {
 		acmeProviders[i] = strings.Trim(acmeProviders[i], "' ")
 	}
-- 
GitLab