utils

package
v1.0.47 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package utils @Description:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckQuestionDB added in v1.0.35

func CheckQuestionDB() bool

CheckQuestionDB *

  • @Description: 检查数据库文件完整性
  • @param user
  • @return bool

func CheckUserCookie added in v1.0.33

func CheckUserCookie(cookies []*http.Cookie) (bool, error)

CheckUserCookie *

  • @Description: 获取用户成绩
  • @param user
  • @return bool

func DownloadDbFile added in v1.0.35

func DownloadDbFile()

func FileIsExist

func FileIsExist(path string) bool

FileIsExist

@Description:
* @param path
* @return bool

func GetAbout

func GetAbout() string

func GetClient added in v1.0.32

func GetClient() *req.Client

func KillOnWin

func KillOnWin(pid int)

func Restart

func Restart()

Restart

@Description:

func Stamp2Str added in v1.0.38

func Stamp2Str(stamp int64) string

时间戳->字符串

func Stamp2Time added in v1.0.38

func Stamp2Time(stamp int64) time.Time

时间戳->时间对象

func Str2Time added in v1.0.38

func Str2Time(formatTimeStr string) time.Time

*字符串->时间对象

func StrMd5

func StrMd5(str string) (retMd5 string)

StrMd5

@Description:
* @param str
* @return retMd5

func Time2Stamp added in v1.0.38

func Time2Stamp() int64

时间对象->时间戳

func Time2Str added in v1.0.38

func Time2Str() string

*时间对象->字符串

Types

type Bar

type Bar struct {
	io.Reader
	// contains filtered or unexported fields
}

func (*Bar) NewOption

func (bar *Bar) NewOption(start, total int64, reader io.Reader)

func (*Bar) NewOptionWithGraph

func (bar *Bar) NewOptionWithGraph(start, total int64, reader io.Reader, graph string)

func (*Bar) Play

func (bar *Bar) Play(cur int64)

func (*Bar) Read

func (bar *Bar) Read(p []byte) (n int, err error)

type LogWriter added in v1.0.37

type LogWriter struct {
}

func (*LogWriter) Write added in v1.0.37

func (l *LogWriter) Write(p []byte) (n int, err error)

type MyLog added in v1.0.39

type MyLog struct {
}

func (*MyLog) Debug added in v1.0.39

func (m *MyLog) Debug(v ...interface{})

func (MyLog) Debugf added in v1.0.39

func (m MyLog) Debugf(format string, v ...interface{})

func (*MyLog) Error added in v1.0.39

func (m *MyLog) Error(v ...interface{})

func (MyLog) Errorf added in v1.0.39

func (m MyLog) Errorf(format string, v ...interface{})

func (*MyLog) Info added in v1.0.39

func (m *MyLog) Info(v ...interface{})

func (*MyLog) Infof added in v1.0.39

func (m *MyLog) Infof(format string, v ...interface{})

func (*MyLog) IsShowSQL added in v1.0.39

func (m *MyLog) IsShowSQL() bool

func (*MyLog) Level added in v1.0.39

func (m *MyLog) Level() log2.LogLevel

func (*MyLog) SetLevel added in v1.0.39

func (m *MyLog) SetLevel(l log2.LogLevel)

func (*MyLog) ShowSQL added in v1.0.39

func (m *MyLog) ShowSQL(show ...bool)

func (*MyLog) Warn added in v1.0.39

func (m *MyLog) Warn(v ...interface{})

func (MyLog) Warnf added in v1.0.39

func (m MyLog) Warnf(format string, v ...interface{})

Directories

Path Synopsis
Package update 该包为程序自我更新,代码源于https://github.com/Mrs4s/go-cqhttp/blob/master/internal/selfupdate/update.go
Package update 该包为程序自我更新,代码源于https://github.com/Mrs4s/go-cqhttp/blob/master/internal/selfupdate/update.go

Jump to

Keyboard shortcuts

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