utils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: MIT-0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteEmpty

func DeleteEmpty(s []string) []string

DeleteEmpty ...

func DropHyphen

func DropHyphen(val string) (Out []int)

func DropOf

func DropOf(val string) string

func FindUrl

func FindUrl(urls []string) (max int)

func GetFanficURL

func GetFanficURL(fanfic string) (fanfics string)

func GetWorkID

func GetWorkID(val string) (WorkID string)

func GetWorkPerPage

func GetWorkPerPage(str string)

func MaxIntSlice

func MaxIntSlice(v []int) int

func RandSleep

func RandSleep(min, max int)

func ReadLines

func ReadLines(path string) ([]string, error)

readLines reads a whole file into memory and returns a slice of its lines.

func RemoveDupStr

func RemoveDupStr(sample []string) []string

func RemoveDuplicateAuthor

func RemoveDuplicateAuthor(sample []string) []string

func SetCookie

func SetCookie(TimeInt int64, name, value, domain, path string, httpOnly, secure bool) chromedp.Action

func ShowCookies

func ShowCookies() chromedp.Action

func SliceFind

func SliceFind(slice []string, val string) (int, bool)

SliceFind search string in slice of string

func SliceIndex

func SliceIndex(limit int, predicate func(i int) bool) int

SliceIndex Get position of element in slice

func Str2int

func Str2int(str string) (intvar int, err error)

func Timer

func Timer(s int)

func WriteJson

func WriteJson(filename string, a interface{})

func WriteLines

func WriteLines(lines []string, path string) error

writeLines writes the lines to the given file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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