Documentation ¶
Index ¶
- Variables
- func AffectedRowsMustSame(rows1, rows2 int64) error
- func CurrentTimeStrAsLog() string
- func DirExists(dir string) bool
- func ErrorMustSame(err1, err2 error) error
- func FileExists(filename string) bool
- func FormatTimeStrAsLog(t time.Time) string
- func Rd(n int) int
- func RdRange(n, m int) int
- func WrapErrExactlyNotSame(format string, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExactlyNotSame = errors.New("exactly not same")
ErrExactlyNotSame is used when we can ensure that the result of a/b tests aren't same
Functions ¶
func AffectedRowsMustSame ¶
AffectedRowsMustSame return error if both affected rows are not same
func CurrentTimeStrAsLog ¶
func CurrentTimeStrAsLog() string
CurrentTimeStrAsLog return time format as "[2006/01/02 15:06:02.886 +08:00]"
func ErrorMustSame ¶
ErrorMustSame return error if both error not same
func FileExists ¶
FileExists checks if a file exists and is not a directory before we try using it to prevent further errors.
func FormatTimeStrAsLog ¶
FormatTimeStrAsLog format given time as as "[2006/01/02 15:06:02.886 +08:00]"
func WrapErrExactlyNotSame ¶
WrapErrExactlyNotSame wraps with ErrExactlyNotSame
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.