mirror of
https://github.com/securego/gosec.git
synced 2024-11-06 12:05:52 +00:00
13 lines
239 B
Go
13 lines
239 B
Go
|
package testutils
|
||
|
|
||
|
import (
|
||
|
"bytes"
|
||
|
"log"
|
||
|
)
|
||
|
|
||
|
// NewLogger returns a logger and the buffer that it will be written to
|
||
|
func NewLogger() (*log.Logger, *bytes.Buffer) {
|
||
|
var buf bytes.Buffer
|
||
|
return log.New(&buf, "", log.Lshortfile), &buf
|
||
|
}
|