2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-30 08:44:02 +00:00
restic/internal/test/helper_go18.go

20 lines
346 B
Go
Raw Normal View History

// +build !go1.9
package test
import "testing"
// Helperer marks the current function as a test helper.
type Helperer interface {
Helper()
}
type fakeHelper struct{}
func (fakeHelper) Helper() {}
// Helper returns a function that marks the current function as a helper function.
func Helper(t testing.TB) Helperer {
return fakeHelper{}
}