ex_pic_to_video/ans.go

41 lines
956 B
Go

package main
import "fmt"
type ANS string
const (
reset ANS = "\033[0m"
red ANS = "\033[31m"
green ANS = "\033[32m"
yellow ANS = "\033[33m"
blue ANS = "\033[34m"
purple ANS = "\033[35m"
cyan ANS = "\033[36m"
white ANS = "\033[37m"
)
func success(content string, arg ...interface{}) {
fmt.Printf("%s%s%s\n", green, fmt.Sprintf(content, arg...), reset)
}
func fatal(content string, arg ...interface{}) {
fmt.Printf("%s%s%s\n", red, fmt.Sprintf(content, arg...), reset)
}
func warning(content string, arg ...interface{}) {
fmt.Printf("%s%s%s\n", yellow, fmt.Sprintf(content, arg...), reset)
}
func log(content string, arg ...interface{}) {
fmt.Printf("%s\n", fmt.Sprintf(content, arg...))
}
func input(content string, arg ...interface{}) {
fmt.Printf("\n%s%s%s", cyan, fmt.Sprintf(content, arg...), reset)
}
func tip(content string, arg ...interface{}) {
fmt.Printf("\n*%s%s%s", purple, fmt.Sprintf(content, arg...), reset)
}