out_test.go 248 B

12345678910111213141516171819
  1. package toml
  2. import (
  3. "flag"
  4. "fmt"
  5. )
  6. var flagOut = false
  7. func init() {
  8. flag.BoolVar(&flagOut, "out", flagOut, "Print debug output.")
  9. flag.Parse()
  10. }
  11. func testf(format string, v ...interface{}) {
  12. if flagOut {
  13. fmt.Printf(format, v...)
  14. }
  15. }