Documentation ¶
Index ¶
- func MockRedis() (redisx.Client, redismock.ClientMock)
- func NewLog() *logx.Logger
- func NewMiniRedis() redisx.Client
- func NewRedisCluster() redisx.Client
- type AnyTime
- type Logger
- func (l *Logger) Case(format string, args ...any)
- func (l *Logger) Fail(format string, args ...any)
- func (l *Logger) Fatal(cond bool, desc string, args ...any)
- func (l *Logger) NoErr(err error)
- func (l *Logger) NoErrf(err error, desc string, args ...any)
- func (l *Logger) Pass(format string, args ...any)
- func (l *Logger) Quit(format string, args ...any)
- func (l *Logger) Require(cond bool, desc string, args ...any)
- func (l *Logger) Title(format string, args ...any)
- type MockDB
- type MockGorm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMiniRedis ¶
func NewRedisCluster ¶
Types ¶
type Logger ¶
func (*Logger) Case ¶
Case is a method to start a new test case, the format parameter will describe the case's purpose, given condition, and expecting results.
func (*Logger) Fail ¶
Fail is an opposite method to Pass, it indicate that current condition does not match the expecting result.
func (*Logger) Pass ¶
Pass is a method who invoking indicate that current condition matches the expecting result.
type MockDB ¶
func NewSqlmock ¶
func NewSqlmock() *MockDB
Click to show internal directories.
Click to hide internal directories.