Documentation ¶
Index ¶
- Constants
- func Domain(url string) string
- func FileLineCounter(r io.Reader) (int, error)
- func FileName(name string, ext string) string
- func FilePath(name, ext string, escape bool) (string, error)
- func FileSize(filePath string) (int64, bool, error)
- func GetNameAndExt(uri string) (string, string, error)
- func GetStringFromJson(json, path string) string
- func ItemInSlice(item, list interface{}) bool
- 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 MergeAudioAndVideo(paths []string, mergedFilePath string) error
- func MergeToMP4(paths []string, mergedFilePath string, filename string) error
- func NeedDownloadList(length int) []int
- func ParseInputFile(r io.Reader) []string
- func PrintVersion()
- func Range(min, max int) []int
- func Reverse(s string) string
- type WaitGroupPool
Constants ¶
const MAXLENGTH = 80
MAXLENGTH Maximum length of file name
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 GetStringFromJson ¶
GetStringFromJson get the string value from json path
func ItemInSlice ¶
func ItemInSlice(item, list interface{}) bool
ItemInSlice if a item is in the list
func LimitLength ¶
LimitLength Handle overly long strings
func MatchOneOf ¶
MatchOneOf match one of the patterns
func MergeAudioAndVideo ¶
MergeAudioAndVideo merge audio and video
func MergeToMP4 ¶
MergeToMP4 merge video parts to MP4
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.