commit 0502335cf6d19c54c0ab6c08fbc1c04668dd356b
parent 86c5a7023fe6533ceea9c1a0dbeb34907be942c2
Author: Andrew Laack <andrew@laack.co>
Date: Tue, 19 May 2026 09:29:33 -0500
Sensible bounds check; removed unnecessary printing
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/main.go b/main.go
@@ -3,7 +3,7 @@ package main
import (
"encoding/json"
"errors"
- "fmt"
+ // "fmt"
"log"
"os"
"os/exec"
@@ -30,8 +30,8 @@ func readConfig() Config {
appConfigDir := configBase + "/nt/"
- fmt.Println(configBase)
- fmt.Println(appConfigDir)
+ // fmt.Println(configBase)
+ // fmt.Println(appConfigDir)
err = os.MkdirAll(appConfigDir, 0755)
@@ -113,7 +113,7 @@ func main() {
// TODO: Ensure all configuration fields are filled in, always in the config
conf = readConfig()
- fmt.Println(conf)
+ // fmt.Println(conf)
app = tview.NewApplication()
@@ -124,7 +124,7 @@ func main() {
num, err := strconv.Atoi(string(r))
- if err == nil {
+ if err == nil && num < len(selectionOptions){
app.Suspend(func() {
editor := os.Getenv("EDITOR")