Documentation ¶
Index ¶
- func Domain(url string) string
- func FileLineCounter(r io.Reader) (int, error)
- func FileName(name, ext string, length int) string
- func FilePath(name, ext string, length int, outputPath string, escape bool) (string, error)
- func FileSize(filePath string) (int64, bool, error)
- func GetNameAndExt(uri string) (string, string, error)
- func LimitLength(s string, length int) string
- func M3u8URLs(uri string) ([]string, error)
- func MatchAll(text, pattern string) [][]string
- func MatchOneOf(text string, patterns ...string) []string
- func Md5(text string) string
- func MergeFilesWithSameExtension(paths []string, mergedFilePath string) error
- func MergeToMP4(paths []string, mergedFilePath string, filename string) error
- func NeedDownloadList(items string, itemStart, itemEnd, length int) []int
- func ParseInputFile(r io.Reader, items string, itemStart, itemEnd int) []string
- func Range(min, max int) []int
- func Reverse(s string) string
- type WaitGroupPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileLineCounter ¶
FileLineCounter Counts line in file
func GetNameAndExt ¶
GetNameAndExt return the name and ext of the URL https://img9.bcyimg.com/drawer/15294/post/1799t/1f5a87801a0711e898b12b640777720f.jpg -> 1f5a87801a0711e898b12b640777720f, jpg
func LimitLength ¶
LimitLength Handle overly long strings
func MatchOneOf ¶
MatchOneOf match one of the patterns
func MergeFilesWithSameExtension ¶
MergeFilesWithSameExtension merges files that have the same extension into one. Can also handle merging audio and video.
func MergeToMP4 ¶
MergeToMP4 merges video parts to an MP4 file.
func NeedDownloadList ¶
NeedDownloadList return the indices of playlist that need download
func ParseInputFile ¶
ParseInputFile Parses input file into args
Types ¶
type WaitGroupPool ¶
type WaitGroupPool struct {
// contains filtered or unexported fields
}
WaitGroupPool pool of WaitGroup
func NewWaitGroupPool ¶
func NewWaitGroupPool(size int) *WaitGroupPool
NewWaitGroupPool creates a sized pool for WaitGroup
func (*WaitGroupPool) Add ¶
func (p *WaitGroupPool) Add()
Add increments the WaitGroup counter by one. See sync.WaitGroup documentation for more information.
func (*WaitGroupPool) Done ¶
func (p *WaitGroupPool) Done()
Done decrements the WaitGroup counter by one. See sync.WaitGroup documentation for more information.
func (*WaitGroupPool) Wait ¶
func (p *WaitGroupPool) Wait()
Wait blocks until the WaitGroup counter is zero. See sync.WaitGroup documentation for more information.