gopkg.in/alecthomas/gometalinter.v3@v3.0.0/_linters/src/github.com/securego/gosec/testutils/log.go (about) 1 package testutils 2 3 import ( 4 "bytes" 5 "log" 6 ) 7 8 // NewLogger returns a logger and the buffer that it will be written to 9 func NewLogger() (*log.Logger, *bytes.Buffer) { 10 var buf bytes.Buffer 11 return log.New(&buf, "", log.Lshortfile), &buf 12 }