Documentation ¶
Overview ¶
Package dramautils is a generated GoMock package.
Index ¶
- Variables
- func AppendString(strs ...string) string
- func ClearLogs() error
- func CloneArr3(src [][][]int) [][][]int
- func Debug(message string, fields ...zap.Field)
- func Error(message string, fields ...zap.Field)
- func Fatal(message string, fields ...zap.Field)
- func FindInt(arr []int, val int) int
- func FindInt3(arr []int, x, y, z int) int
- func FindIntArr(arr [][]int, vals []int) int
- func FormatNow(t ITime) string
- func GenHashCode(length int) string
- func GetCurTimestamp() int64
- func GetJsonFloat(data []byte, keys ...string) (val float64, err error)
- func GetJsonInt(data []byte, keys ...string) (val int64, err error)
- func GetJsonString(data []byte, keys ...string) (val string, err error)
- func GetLogger() *zap.Logger
- func Info(message string, fields ...zap.Field)
- func InitLogger(logname string, appVersion string, level string, isConsole bool, ...)
- func Int32ArrToIntArr2(arr []int32, x, y int) ([][]int, error)
- func Int32ArrToIntArr3(arr []int32, x, y, z int) ([][][]int, error)
- func Int3Arr2ToInt4Arr2(arr [][]int, val int) [][]int
- func IntArr2ToInt32Arr(arr [][]int) ([]int32, int, int)
- func IntArr3ToInt32Arr(arr [][][]int) ([]int32, int, int, int)
- func IsSameIntArr2(arr0 [][]int, arr1 [][]int) bool
- func IsSameIntArr2Ex(arr0 [][]int, arr1 [][]int32) bool
- func IsSameIntArr2Ex2(arr0 [][]int, arr1 [][]int, x int) bool
- func JSON(name string, jobj interface{}) zap.Field
- func String2Float64(str string) (float64, error)
- func String2Int64(str string) (int64, error)
- func SyncLogger()
- func Warn(message string, fields ...zap.Field)
- type ITime
- type MockITime
- type MockITimeMockRecorder
- type Time
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidArrayLength - invalid array length ErrInvalidArrayLength = errors.New("invalid array length") // ErrInvalidJsonString - invalid json string ErrInvalidJsonString = errors.New("invalid json string") // ErrInvalidJsonInt - invalid json int ErrInvalidJsonInt = errors.New("invalid json int") )
Functions ¶
func FindIntArr ¶
FindIntArr - find a int array into [][]int
func GetCurTimestamp ¶
func GetCurTimestamp() int64
func GetJsonString ¶
GetJsonString - number to string
func InitLogger ¶
InitLogger - initializes a thread-safe singleton logger
func Int32ArrToIntArr2 ¶
Int32ArrToIntArr2 - []int32 to [][]int
func Int32ArrToIntArr3 ¶
Int32ArrToIntArr3 - []int32 to [][][]int
func Int3Arr2ToInt4Arr2 ¶
Int3Arr2ToInt4Arr2 - []int{x,y,z} -> []int{x,y,z,v}
func IntArr2ToInt32Arr ¶
IntArr2ToInt32Arr - [][]int to []int32
func IntArr3ToInt32Arr ¶
IntArr3ToInt32Arr - [][][]int to []int32
func IsSameIntArr2Ex2 ¶
IsSameIntArr2Ex - 只比较前x个
func String2Float64 ¶
func String2Int64 ¶
Types ¶
type MockITime ¶
type MockITime struct {
// contains filtered or unexported fields
}
MockITime is a mock of ITime interface
func NewMockITime ¶
func NewMockITime(ctrl *gomock.Controller) *MockITime
NewMockITime creates a new mock instance
func (*MockITime) EXPECT ¶
func (m *MockITime) EXPECT() *MockITimeMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockITimeMockRecorder ¶
type MockITimeMockRecorder struct {
// contains filtered or unexported fields
}
MockITimeMockRecorder is the mock recorder for MockITime
func (*MockITimeMockRecorder) Now ¶
func (mr *MockITimeMockRecorder) Now() *gomock.Call
Now indicates an expected call of Now
Click to show internal directories.
Click to hide internal directories.