Skip to content

Commit

Permalink
fix(be): default values for setup
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftin committed Aug 11, 2021
1 parent 960d5e3 commit 730965c
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions cli/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,27 +150,9 @@ func askValue(prompt string, defaultValue string, item interface{}) {
}
fmt.Print(": ")

_, _ = fmt.Sscanln(defaultValue, item)

scanErrorChecker(fmt.Scanln(item))
//str, err := stdin.ReadString('\n')
//if err != nil {
// log.WithFields(log.Fields{"level": "Warn"}).Warn(err.Error())
//}

// Remove newlines
//str = strings.TrimSuffix(str, "\n")
//str = strings.TrimSuffix(str, "\r")
//
//// If default, print default on input line
//if len(str) == 0 {
// str = defaultValue
// fmt.Print("\033[1A")
// fmt.Println("> " + defaultValue)
//}
//
////Parse
//if _, err := fmt.Sscanln(str, item); err != nil && err != io.EOF {
// log.WithFields(log.Fields{"level": "Warn"}).Warn(err.Error())
//}

// Empty line after prompt
fmt.Println("")
Expand Down

0 comments on commit 730965c

Please sign in to comment.