summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/platforms/linkedin/linkedin.go4
-rw-r--r--internal/prompt/prompt.go7
2 files changed, 6 insertions, 5 deletions
diff --git a/internal/platforms/linkedin/linkedin.go b/internal/platforms/linkedin/linkedin.go
index b07ab70..c283fbc 100644
--- a/internal/platforms/linkedin/linkedin.go
+++ b/internal/platforms/linkedin/linkedin.go
@@ -58,7 +58,7 @@ func callLinkedInAPI(ctx context.Context, personID, accessToken, content string)
post := map[string]interface{}{
"author": fmt.Sprintf("urn:li:person:%s", personID),
- "commentary": content, // TODO: Can't post (...) paretenthesis? escape them?
+ "commentary": content, // TODO: Can't post (...) paretenthesis? escape them? TEST AGAIN!
"visibility": "PUBLIC",
"distribution": map[string]interface{}{
"feedDistribution": "MAIN_FEED",
@@ -98,3 +98,5 @@ func callLinkedInAPI(ctx context.Context, personID, accessToken, content string)
}
return err
}
+
+// TODO: Implement Gemini output?
diff --git a/internal/prompt/prompt.go b/internal/prompt/prompt.go
index bf5997d..6eecf60 100644
--- a/internal/prompt/prompt.go
+++ b/internal/prompt/prompt.go
@@ -46,8 +46,7 @@ func whatNow(question string) error {
continue
}
- input = strings.TrimSpace(input)
- switch strings.ToLower(input) {
+ switch strings.ToLower(strings.TrimSpace(input)) {
case "y", "yes":
return nil
case "n", "no":
@@ -61,8 +60,8 @@ func whatNow(question string) error {
}
func EditFile(filePath string) error {
- editor := os.Getenv("EDITOR")
- if editor == "" {
+ editor, ok := os.LookupEnv("EDITOR")
+ if !ok {
return errors.New("EDITOR environment variable is not set")
}