summaryrefslogtreecommitdiff
path: root/buildPlugin.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-06 20:08:54 -0500
committerJeff Carr <[email protected]>2025-09-06 20:08:54 -0500
commitb97c502b54ff0f5036cee90287de3af297faab01 (patch)
tree26bad7c448eb2662e9494714ddb5775630364cff /buildPlugin.go
parentfc6b049b37fc7a282958c2cbca19724a5b8ddc77 (diff)
make Global. duh.v0.0.17
Diffstat (limited to 'buildPlugin.go')
-rw-r--r--buildPlugin.go27
1 files changed, 1 insertions, 26 deletions
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
-}