...
▽

Source file src/golang.conradwood.net/go-easyops/common/printf.go

Documentation: golang.conradwood.net/go-easyops/common

     1  package common
     2  
     3  import (
     4  	"flag"
     5  	"fmt"
     6  )
     7  
     8  var (
     9  	nostdout = flag.Bool("ge_no_stdout", false, "if true nothing will be printed on stdout")
    10  )
    11  
    12  func IsStdoutAllowed() bool {
    13  	return !*nostdout
    14  }
    15  
    16  func FancyPrintf(msg string, args ...interface{}) {
    17  	if *nostdout {
    18  		return
    19  	}
    20  
    21  	l := "[go-easyops] "
    22  	fmt.Printf(l+msg, args...)
    23  }
    24  

View as plain text