urfave-cli/helpers_test.go
David Bond f2bed637fd
Add Destination field to TimestampFlag
Adds a `Destination` field for the `TimestampFlag` type that allows you to specify a pointer to
a `Timestamp` rather than having to grab the `Timestamp` from the `cli.Context` using the flag
name.
2021-03-07 03:36:56 +00:00

20 lines
320 B
Go

package cli
import (
"os"
"reflect"
"testing"
)
func init() {
_ = os.Setenv("CLI_TEMPLATE_REPANIC", "1")
}
func expect(t *testing.T, a interface{}, b interface{}) {
t.Helper()
if !reflect.DeepEqual(a, b) {
t.Errorf("Expected %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a))
}
}