Function to print logs
(log Log, text string)
| 22 | |
| 23 | // Function to print logs |
| 24 | func printLog(log Log, text string) { |
| 25 | switch log { |
| 26 | case logError: |
| 27 | fmt.Printf("[%s] %s %s\n", ansi.ColorFunc("red")("!"), ansi.ColorFunc("red")("ERROR:"), ansi.ColorFunc("cyan")(text)) |
| 28 | case logInfo: |
| 29 | fmt.Printf("[%s] %s\n", ansi.ColorFunc("blue")("i"), text) |
| 30 | case logStatus: |
| 31 | fmt.Printf("[*] %s\n", text) |
| 32 | case logInput: |
| 33 | fmt.Printf("[%s] %s", ansi.ColorFunc("yellow")("?"), text) |
| 34 | case logSuccess: |
| 35 | fmt.Printf("[%s] %s\n", ansi.ColorFunc("green")("+"), text) |
| 36 | case logSection: |
| 37 | fmt.Printf("\t[%s] %s\n", ansi.ColorFunc("yellow")("-"), text) |
| 38 | case logSubSection: |
| 39 | fmt.Printf("\t\t[%s] %s\n", ansi.ColorFunc("magenta")(">"), text) |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | func GetConf(configPath string) (map[string]string, error) { |
| 44 | var conf map[string]string |