diff --git a/mtstep.exe b/mtstep.exe index 816cafb..da3a97f 100644 Binary files a/mtstep.exe and b/mtstep.exe differ diff --git a/pkg/util/terminal.go b/pkg/util/terminal.go index 65fb2ae..7fc31b5 100644 --- a/pkg/util/terminal.go +++ b/pkg/util/terminal.go @@ -1,25 +1,35 @@ package util import ( - "bufio" "fmt" - "os" - "strings" ) +// func InputTerminal(name string) string { + +// fmt.Print(name + ": ") +// reader := bufio.NewReader(os.Stdin) +// ret, _ := reader.ReadString('\n') +// splitedSlice := strings.Split(ret, " ") + +// if len(splitedSlice) == 1 { +// splSlice2 := strings.Split(splitedSlice[0], "\n") +// ret = splSlice2[0] +// } else { +// ret = splitedSlice[0] +// } + +// retB := []byte(ret) +// fmt.Print(fmt.Sprintf("%s", retB[len(retB):])) +// if fmt.Sprintf("%s", retB[len(retB):]) == "[13]" { +// ret = fmt.Sprintf("%s", retB[:len(retB)-1]) +// } +// fmt.Printf("%d\n", []byte(ret)) +// return ret +// } + func InputTerminal(name string) string { - + var ret string fmt.Print(name + ": ") - reader := bufio.NewReader(os.Stdin) - ret, _ := reader.ReadString('\n') - splitedSlice := strings.Split(ret, " ") - - if len(splitedSlice) == 1 { - splSlice2 := strings.Split(splitedSlice[0], "\n") - ret = splSlice2[0] - } else { - ret = splitedSlice[0] - } - + fmt.Scanln(&ret) return ret }