featurebase/testhook/cleanup1.14.go
reesporte 48aef0c8a4 add copyright notice back in
```bash
for file in `cat diffys`; do
   printf '%s\n%s\n' "// Copyright 2021 Molecula Corp. All rights reserved." "$(cat $file)" >$file;
done
```
2021-12-10 11:01:04 -06:00

16 lines
387 B
Go

// Copyright 2021 Molecula Corp. All rights reserved.
//go:build go1.14
// +build go1.14
package testhook
import (
"testing"
)
// Cleanup in 1.13 logs a message about skipping a cleanup function, but
// allows things to build. Cleanup in 1.14 uses tb.Cleanup to register
// a cleanup function to call when a test completes.
func Cleanup(tb testing.TB, fn func()) {
tb.Cleanup(fn)
}