utils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package utils 工具包

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(ss []string, s string) bool

ContainsString 检测字符串是否在字符串数组里

func DecompressGZIP

func DecompressGZIP(r io.Reader) ([]byte, error)

DecompressGZIP 对 io.Reader 数据, 进行 gzip 解压

func FlagProvided

func FlagProvided(names ...string) bool

FlagProvided 检测命令行是否提供名为 name 的 flag, 支持多个name(names)

func GetURLCookieString

func GetURLCookieString(urlString string, jar *cookiejar.Jar) string

GetURLCookieString 返回cookie字串

func Trigger

func Trigger(f func())

Trigger 用于触发事件

func TriggerOnSync

func TriggerOnSync(f func())

TriggerOnSync 用于触发事件, 同步触发

func TrimPathPrefix

func TrimPathPrefix(path, prefixPath string) string

TrimPathPrefix 去除目录的前缀

Types

This section is empty.

Jump to

Keyboard shortcuts

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