Documentation ¶
Index ¶
- Constants
- func ConvertString2Int(numberStr string, fallback int) int
- func DownloadBinaryWithTCP(inputUrl string, downloadTo string, headers map[string]string) error
- func DurationStr2Second(durationStr string) int
- func ExecCmd(program string, arg ...string) (string, error)
- func FilterUnexpectedChar(path string) string
- func GenReqID() string
- func GetCookie(source, url string, headers map[string]string, isHead bool) (string, error)
- func GetCurrentDir() (string, error)
- func GetExtFromUrl(url string) string
- func GetLocation(source, url string, headers map[string]string) (string, error)
- func HttpGet(source, url string, headers map[string]string) (string, error)
- func HttpHead(source, url string, headers map[string]string) error
- func InArray(array []string, value string) bool
- func InitConfig()
- func Md5(str string) string
- func ModifyFileExt(filename, newExt string) string
- func PostForm(source, url string, data, headers map[string]string) (string, error)
- func RegexSingleMatch(input string, expression string) (string, error)
- func RegexSingleMatchIgnoreError(input string, expression string, fallback string) string
- func RegexSingleMatchIntIgnoreError(input string, expression string, fallback int) int
- func RemoveBracketsFromString(str string) string
- func RemoveTagFromString(str string) string
- func SimilarText(str1, str2 string) float64
- func Unzip(zipFile, outputPath string) bool
- func WgetBinary(url string, downloadTo string, headers map[string]string) error
- type MediaGetConfig
- type TCPProgressReader
- type WgetBinaryProgressReader
Constants ¶
View Source
const ConfigENV = "ENV_MEDIA_GET"
View Source
const ConfigFile = ".media-get.json"
View Source
const HttpRetryCnt = 3
View Source
const TcpConnectTimeout = 1500 * time.Millisecond
View Source
const TimeOut = 3 * time.Second
Variables ¶
This section is empty.
Functions ¶
func ConvertString2Int ¶
func DownloadBinaryWithTCP ¶ added in v0.2.6
func DurationStr2Second ¶
func FilterUnexpectedChar ¶ added in v0.2.5
func GetCurrentDir ¶
func GetExtFromUrl ¶
func InitConfig ¶ added in v0.2.9
func InitConfig()
func ModifyFileExt ¶
func RemoveBracketsFromString ¶ added in v0.2.0
func RemoveTagFromString ¶ added in v0.2.0
func SimilarText ¶ added in v0.2.0
Types ¶
type MediaGetConfig ¶ added in v0.2.9
func GetConfig ¶ added in v0.2.9
func GetConfig() *MediaGetConfig
type TCPProgressReader ¶ added in v0.2.8
Click to show internal directories.
Click to hide internal directories.