master > master: code go - interactive mode eingerichtet

This commit is contained in:
RD
2021-11-03 16:05:46 +01:00
parent 53978d584b
commit 324b8d2fcd
8 changed files with 409 additions and 67 deletions

View File

@@ -6,7 +6,6 @@ package menus
import (
"fmt"
"reflect"
"ads/internal/core/logging"
"ads/internal/core/utils"
@@ -76,16 +75,3 @@ func PromptListOfOptions(messages []string, options [][2]string, breaks []int, d
}
return choice, false
}
/* ---------------------------------------------------------------- *
* METHOD prompt values
* ---------------------------------------------------------------- */
func PromptValue(varname string, typename string, example string, t reflect.Type) (bool, error) {
_, cancel, err := logging.Prompt(
fmt.Sprintf("Bitte den Wert von \033[1m%s\033[0m als \033[1m%s\033[0m eingeben.", varname, typename),
example,
)
// TODO: input parsen
return cancel, err
}