sgc7utils

package
v0.5.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package sgc7utils is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendString added in v0.1.10

func AppendString(strs ...string) string

AppendString - append string

func ClearLogs added in v0.1.10

func ClearLogs() error

ClearLogs - clear logs

func Debug added in v0.1.10

func Debug(message string, fields ...zap.Field)

Debug logs a debug message with the given fields

func Error added in v0.1.10

func Error(message string, fields ...zap.Field)

Error logs a debug message with the given fields

func Fatal added in v0.1.10

func Fatal(message string, fields ...zap.Field)

Fatal logs a message than calls os.Exit(1)

func FormatNow added in v0.1.10

func FormatNow(t ITime) string

FormatNow - format time

func GetLogger added in v0.1.10

func GetLogger() *zap.Logger

GetLogger - get zap.Logger

func IndexOfInt2Slice added in v0.2.21

func IndexOfInt2Slice(arr []int, x, y int, start int) int

IndexOfInt2Slice - indexof for []int2, []int2 is like [x0, y0, x1, y1, ...]

start * 2 <--> len([]int)

func IndexOfIntSlice added in v0.2.21

func IndexOfIntSlice(arr []int, v int, start int) int

IndexOfIntSlice - indexof for []int

func IndexOfStringSlice added in v0.2.21

func IndexOfStringSlice(arr []string, v string, start int) int

IndexOfStringSlice - indexof for []string

func Info added in v0.1.10

func Info(message string, fields ...zap.Field)

Info logs a debug message with the given fields

func InitLogger added in v0.1.10

func InitLogger(logname string, appVersion string, level string, isConsole bool, logpath string)

InitLogger - initializes a thread-safe singleton logger

func InsUniqueIntSlice added in v0.3.31

func InsUniqueIntSlice(arr []int, v int) []int

InsUniqueIntSlice - Insert unique int array

func IsSameFile added in v0.2.21

func IsSameFile(fna string, fnb string) bool

IsSameFile - filea == fileb

func JSON added in v0.2.16

func JSON(name string, jobj interface{}) zap.Field

JSON - It's like zap.String(name, str)

func SyncLogger added in v0.1.10

func SyncLogger()

SyncLogger - sync logger

func Warn added in v0.1.10

func Warn(message string, fields ...zap.Field)

Warn logs a debug message with the given fields

Types

type ITime added in v0.2.39

type ITime interface {
	// Now - get now time
	Now() time.Time
}

ITime - Time

type MockITime added in v0.2.39

type MockITime struct {
	// contains filtered or unexported fields
}

MockITime is a mock of ITime interface

func NewMockITime added in v0.2.39

func NewMockITime(ctrl *gomock.Controller) *MockITime

NewMockITime creates a new mock instance

func (*MockITime) EXPECT added in v0.2.39

func (m *MockITime) EXPECT() *MockITimeMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockITime) Now added in v0.2.39

func (m *MockITime) Now() time.Time

Now mocks base method

type MockITimeMockRecorder added in v0.2.39

type MockITimeMockRecorder struct {
	// contains filtered or unexported fields
}

MockITimeMockRecorder is the mock recorder for MockITime

func (*MockITimeMockRecorder) Now added in v0.2.39

func (mr *MockITimeMockRecorder) Now() *gomock.Call

Now indicates an expected call of Now

type RngInfo

type RngInfo struct {
	Bits  int `json:"bits"`
	Range int `json:"range"`
	Value int `json:"value"`
}

RngInfo - rng infomation

type Time added in v0.1.10

type Time struct {
}

Time - default Time

func (Time) Now added in v0.1.10

func (t Time) Now() time.Time

Now - get now time

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL