gopkg.in/tools/godep.v56@v56.0.0-20160226230103-b32db8cfcaad/msg.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"log"
     6  
     7  	"github.com/tools/godep/Godeps/_workspace/src/github.com/kr/pretty"
     8  )
     9  
    10  func debugln(a ...interface{}) (int, error) {
    11  	if debug {
    12  		return fmt.Println(a...)
    13  	}
    14  	return 0, nil
    15  }
    16  
    17  func verboseln(a ...interface{}) {
    18  	if verbose {
    19  		log.Println(a...)
    20  	}
    21  }
    22  
    23  func debugf(format string, a ...interface{}) (int, error) {
    24  	if debug {
    25  		return fmt.Printf(format, a...)
    26  	}
    27  	return 0, nil
    28  }
    29  
    30  func verbosef(format string, a ...interface{}) {
    31  	if verbose {
    32  		log.Printf(format, a...)
    33  	}
    34  }
    35  
    36  func pp(a ...interface{}) (int, error) {
    37  	if debug {
    38  		return pretty.Print(a...)
    39  	}
    40  	return 0, nil
    41  }
    42  
    43  func ppln(a ...interface{}) (int, error) {
    44  	if debug {
    45  		return pretty.Println(a...)
    46  	}
    47  	return 0, nil
    48  }
    49  
    50  func ppf(format string, a ...interface{}) (int, error) {
    51  	if debug {
    52  		return pretty.Printf(format, a...)
    53  	}
    54  	return 0, nil
    55  }