utils

package
v0.0.0-...-8fdaee9 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 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

func CheckQuestionDB() bool

CheckQuestionDB *

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

func CheckUserCookie

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

CheckUserCookie *

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

func DownloadDbFile

func DownloadDbFile()

func FileIsExist

func FileIsExist(path string) bool

FileIsExist

@Description:
* @param path
* @return bool

func GetAbout

func GetAbout() string

func GetClient

func GetClient() *req.Client

func KillOnWin

func KillOnWin(pid int)

func Restart

func Restart()

Restart

@Description:

func Stamp2Str

func Stamp2Str(stamp int64) string

时间戳->字符串

func Stamp2Time

func Stamp2Time(stamp int64) time.Time

时间戳->时间对象

func Str2Time

func Str2Time(formatTimeStr string) time.Time

*字符串->时间对象

func StrMd5

func StrMd5(str string) (retMd5 string)

StrMd5

@Description:
* @param str
* @return retMd5

func Time2Stamp

func Time2Stamp() int64

时间对象->时间戳

func Time2Str

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

type LogWriter struct {
}

func (*LogWriter) Write

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

type MyLog

type MyLog struct {
}

func (*MyLog) Debug

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

func (MyLog) Debugf

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

func (*MyLog) Error

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

func (MyLog) Errorf

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

func (*MyLog) Info

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

func (*MyLog) Infof

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

func (*MyLog) IsShowSQL

func (m *MyLog) IsShowSQL() bool

func (*MyLog) Level

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

func (*MyLog) SetLevel

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

func (*MyLog) ShowSQL

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

func (*MyLog) Warn

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

func (MyLog) Warnf

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