Explorar o código

Add coloring for warnings

DarthSim %!s(int64=7) %!d(string=hai) anos
pai
achega
5896dfd29b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      errors.go

+ 1 - 1
errors.go

@@ -46,5 +46,5 @@ func stacktrace(skip int) string {
 }
 
 func warning(f string, args ...interface{}) {
-	log.Printf("[WARNING] %s", fmt.Sprintf(f, args...))
+	log.Printf("\033[1;33m[WARNING]\033[0m %s", fmt.Sprintf(f, args...))
 }