utils

package
v1.0.38 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: AGPL-3.0 Imports: 13 Imported by: 1

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)

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