mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
de0b3324b1
This plugin invokes the provided function with each log line as the payload. Closes #342
18 lines
275 B
Go
18 lines
275 B
Go
package test
|
|
|
|
import "testing"
|
|
|
|
type quiet struct {
|
|
*testing.T
|
|
}
|
|
|
|
// Quiet returns a wrapper around testing.T that silences Logf calls
|
|
func Quiet(t *testing.T) *quiet {
|
|
return &quiet{t}
|
|
}
|
|
|
|
func (q *quiet) Logf(format string, args ...interface{}) {
|
|
// No logging
|
|
return
|
|
}
|