restructure the API and update the admin script
This commit is contained in:
@ -5,8 +5,17 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
var (
|
||||
Info = log.New(os.Stdout, "\033[34m[info]\033[0m ", log.Ltime|log.Lshortfile).Printf
|
||||
Warn = log.New(os.Stderr, "\033[33m[warn]\033[0m ", log.Ltime|log.Lshortfile).Printf
|
||||
Fail = log.New(os.Stderr, "\033[31m[fail]\033[0m ", log.Ltime|log.Lshortfile).Printf
|
||||
const (
|
||||
COLOR_BLUE = "\033[34m"
|
||||
COLOR_YELLOW = "\033[33m"
|
||||
COLOR_RED = "\033[31m"
|
||||
COLOR_CYAN = "\033[36m"
|
||||
COLOR_RESET = "\033[0m"
|
||||
)
|
||||
|
||||
var (
|
||||
Debg = log.New(os.Stdout, COLOR_CYAN+"[debg]"+COLOR_RESET+" ", log.Ltime|log.Lshortfile).Printf
|
||||
Info = log.New(os.Stdout, COLOR_BLUE+"[info]"+COLOR_RESET+" ", log.Ltime|log.Lshortfile).Printf
|
||||
Warn = log.New(os.Stderr, COLOR_YELLOW+"[warn]"+COLOR_RESET+" ", log.Ltime|log.Lshortfile).Printf
|
||||
Fail = log.New(os.Stderr, COLOR_RED+"[fail]"+COLOR_RESET+" ", log.Ltime|log.Lshortfile).Printf
|
||||
)
|
||||
|
Reference in New Issue
Block a user