From b97c502b54ff0f5036cee90287de3af297faab01 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 6 Sep 2025 20:08:54 -0500 Subject: make Global. duh. --- buildPlugin.go | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'buildPlugin.go') diff --git a/buildPlugin.go b/buildPlugin.go index 07500d9..8d455a9 100644 --- a/buildPlugin.go +++ b/buildPlugin.go @@ -1,11 +1,6 @@ package fhelp import ( - "bufio" - "fmt" - "os" - "strings" - "go.wit.com/lib/gui/shell" "go.wit.com/log" ) @@ -29,7 +24,7 @@ func BuildPlugin(pname string) bool { log.Infof("To attempt to build the %s plugin, run:\n", pname) log.Info("forge --build go.wit.com/toolkits/gocui") log.Info("") - if !questionUser() { + if !QuestionUser("Would you like to run that now?") { return false } r := shell.RunRealtime([]string{"forge", "--build", "go.wit.com/toolkits/" + pname}) @@ -42,23 +37,3 @@ func BuildPlugin(pname string) bool { } return false } - -func questionUser() bool { - log.Info("Would you like to run that now?") - fmt.Fprintf(os.Stdout, "(y)es or (n)o ? ") - - scanner := bufio.NewScanner(os.Stdin) - for scanner.Scan() { - line := scanner.Text() - line = strings.TrimSpace(line) - line = strings.ToLower(line) - switch line { - case "y": - return true - case "n": - return false - default: - } - } - return false -} -- cgit v1.2.3