summaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-11-08 23:04:51 +0200
committerPaul Buetow <paul@buetow.org>2024-11-08 23:04:51 +0200
commit5ee4d7a6020e32159e735ff9e5b38be5da6bfe9c (patch)
treecabe16c43c3ffa4a6f55c2c3095b30bfc809aa9f /internal/config
parent9b14c12e0ccd5c96dd9f17d1b20fe134308d2184 (diff)
dont use logger but color outputter
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/args.go5
-rw-r--r--internal/config/secrets.go5
2 files changed, 6 insertions, 4 deletions
diff --git a/internal/config/args.go b/internal/config/args.go
index 8c9f767..a0fa0ea 100644
--- a/internal/config/args.go
+++ b/internal/config/args.go
@@ -2,11 +2,12 @@ package config
import (
"fmt"
- "log"
"slices"
"strconv"
"strings"
"time"
+
+ "codeberg.org/snonux/gos/internal/colour"
)
var validPlatforms = []string{"mastodon", "linkedin"}
@@ -38,7 +39,7 @@ func (a *Args) ParsePlatforms(platforms string) error {
return err
}
} else {
- log.Println("No message length specified for", platform, "so assuming 500")
+ colour.Infoln("No message length specified for", platform, "so assuming 500")
a.Platforms[parts[0]] = 500
}
}
diff --git a/internal/config/secrets.go b/internal/config/secrets.go
index 6ed1c1f..338d17a 100644
--- a/internal/config/secrets.go
+++ b/internal/config/secrets.go
@@ -4,8 +4,9 @@ import (
"encoding/json"
"fmt"
"io"
- "log"
"os"
+
+ "codeberg.org/snonux/gos/internal/colour"
)
// The config file containing all the secrets and credentials.
@@ -42,7 +43,7 @@ func NewSecrets(configPath string) (Secrets, error) {
}
func (s Secrets) WriteToDisk(configPath string) error {
- log.Println("Writing", configPath)
+ colour.Infoln("Writing", configPath)
bytes, err := json.MarshalIndent(s, "", " ")
if err != nil {