Documentation
¶
Overview ¶
Package utils @Description:
Package utils @Description:
Index ¶
- Variables
- func Black(str string) string
- func Blue(str string) string
- func Cyan(str string) string
- func GetLogLevel(level string) []log.Level
- func GetPWScreen(url string, device string) ([]byte, error)
- func Green(str string) string
- func PathExists(path string) (bool, error)
- func Purple(str string) string
- func PwInit()
- func Red(str string) string
- func SearchImage(ketWord string) ([]string, error)
- func SetConfig(enable bool)
- func White(str string) string
- func WriteToFile(name string, data []byte) error
- func Yellow(str string) string
- type LogFormat
- type LogHook
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PW = &playwright.Playwright{} Browser playwright.Browser )
Functions ¶
func PathExists ¶ added in v1.0.24
PathExists *
- @Description: 判断文件或文件夹是否存在 如果返回的错误为nil,说明文件或文件夹存在 如果返回的错误类型使用os.IsNotExist()判断为true,说明文件或文件夹不存在 如果返回的错误为其它类型,则不确定是否在存在
- @param path
- @return bool
- @return error
- example
func SearchImage ¶
SearchImage *
- @Description:
- @param ketWord
- @return []string
- @return error
- example
func WriteToFile ¶ added in v1.0.24
Types ¶
type LogFormat ¶
type LogHook ¶
type LogHook struct {
EnableLogChan bool
LogChan chan string
// contains filtered or unexported fields
}
LogHook @Description:
func NewLogHook ¶
NewLogHook *
- @Description:
- @param formatter
- @param levels
- @param writers
- @return *LogHook
- example
Click to show internal directories.
Click to hide internal directories.