an updated and hopefully faster version of the ST Toolbox
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

37 lines
741 B

package ui
import (
"fmt"
"github.com/inancgumus/screen"
)
func ClearScreen() {
screen.Clear()
screen.MoveTopLeft()
}
func DisplayStartScreen() {
ClearScreen()
fmt.Println("========================================")
fmt.Println(" Welcome to ServiceTrade CLI")
fmt.Println("========================================")
fmt.Println("Please log in with your ServiceTrade credentials to continue.")
fmt.Println()
}
func DisplayMessage(message string) {
fmt.Println(message)
}
func DisplayError(prefix string, err error) {
fmt.Printf("%s %v\n", prefix, err)
}
func DisplayMenu(items []string, title string) {
ClearScreen()
fmt.Printf("\n%s:\n", title)
for i, item := range items {
fmt.Printf("%d. %s\n", i+1, item)
}
}