Explorar el Código

log.Info will respect global flags

pull/36/head
Rob Loranger hace 4 años
padre
commit
941d234395
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: D6F1633A4F0903B8
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      log/logging.go

+ 1
- 1
log/logging.go Ver fichero

@@ -10,7 +10,7 @@ import (
// Info logs general diagnostic messages, shown only when the -v or --verbose
// flag is provided.
func Info(c *cli.Context, s string, p ...interface{}) {
if c.Bool("v") || c.Bool("verbose") {
if c.Bool("v") || c.Bool("verbose") || c.GlobalBool("v") || c.GlobalBool("verbose") {
fmt.Fprintf(os.Stderr, s+"\n", p...)
}
}


Cargando…
Cancelar
Guardar