Create Golang version devtool #7
@ -41,8 +41,10 @@ func InputPrint(message string) {
|
|||||||
fmt.Println(colorYellow, message, colorReset)
|
fmt.Println(colorYellow, message, colorReset)
|
||||||
}
|
}
|
||||||
|
|
||||||
func MenuPrint() {
|
func MenuPrint(question, menu string) {
|
||||||
InputPrint("Which repository or action do you want to operate:")
|
if question != "" {
|
||||||
|
InputPrint(fmt.Sprintf("[%s]", question))
|
||||||
|
}
|
||||||
|
|
||||||
// menu := `
|
// menu := `
|
||||||
// 1. Build Portainer EE/CE All
|
// 1. Build Portainer EE/CE All
|
||||||
@ -56,10 +58,5 @@ func MenuPrint() {
|
|||||||
// 9. Cleanup Temporary Volume
|
// 9. Cleanup Temporary Volume
|
||||||
// `
|
// `
|
||||||
|
|
||||||
menu := `1. Portainer EE Repository
|
|
||||||
2. Portainer CE Repository
|
|
||||||
3. Portainer Agent Repository
|
|
||||||
4. Others`
|
|
||||||
|
|
||||||
fmt.Println(colorCyan, menu, colorReset)
|
fmt.Println(colorCyan, menu, colorReset)
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,14 @@ func PromptContinue() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func PromptMenu(listMenu func()) int {
|
||||||
|
listMenu()
|
||||||
|
|
||||||
|
var option int
|
||||||
|
fmt.Scanf("%d", &option)
|
||||||
|
return option
|
||||||
|
}
|
||||||
|
|
||||||
func prompt(question string) string {
|
func prompt(question string) string {
|
||||||
fmt.Printf("%s %s :%s", colorYellow, question, colorReset)
|
fmt.Printf("%s %s :%s", colorYellow, question, colorReset)
|
||||||
var ret string
|
var ret string
|
||||||
|
Loading…
Reference in New Issue
Block a user