mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-29 21:36:38 -04:00
Implement initial entry editing support (no notes editing or gen update)
This commit is contained in:
@@ -7,14 +7,15 @@ import (
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// input prompts the user for input and returns the input as a string
|
||||
func input(prompt string) string {
|
||||
fmt.Print("\n" + prompt + " ")
|
||||
var userInput string
|
||||
fmt.Scanln(&userInput)
|
||||
return userInput
|
||||
reader := bufio.NewReader(os.Stdin)
|
||||
userInput, _ := reader.ReadString('\n')
|
||||
return strings.TrimRight(userInput, "\n ") // remove trailing newlines and spaces
|
||||
}
|
||||
|
||||
// inputHidden prompts the user for input and returns the input as a string, hiding the input from the terminal
|
||||
|
||||
Reference in New Issue
Block a user