Documentation
¶
Index ¶
- Constants
- Variables
- func CheckZhCn(s string) bool
- func ConvertZhCnNumbToa(cnn string) (string, error)
- func FileSeparatorConv(path string) string
- func GetExecutePath() (string, error)
- func IsJsonFile(fn string) bool
- func IsNumber(s string) bool
- func IsRegexp(str string) bool
- func IsSubtitleFile(fn string) bool
- func IsVideofile(fn string) bool
- func ParseShort02Time(strd string) (string, error)
- func ParseShortTime(strd string) (string, error)
- func ParseTime(strd, layout string) (time.Time, error)
- func ParseTimeStr(t time.Time) string
- func SetSubtract[T comparable, V any](a map[T]V, b map[T]struct{}) (res map[T]V)
- func SliceDelete[S ~[]E, E any](s S, i int) S
- func TrimExtensionAndGetEpi(fn string) string
- type ListView
- type StringAppender
- type Timer
- type Tuple
Constants ¶
View Source
const ( YMDParseLayout = "2006年1月2日" YMD02ParseLayout = "2006年01月02日" ShortDateLayout = "200601" Day = 24 * time.Hour // 24h0m0s Week = 7 * Day )
Variables ¶
View Source
var Asia_Shanghai, _ = time.LoadLocation("Asia/Shanghai")
Functions ¶
func ConvertZhCnNumbToa ¶
func FileSeparatorConv ¶
func GetExecutePath ¶
func IsJsonFile ¶
func IsSubtitleFile ¶
func IsVideofile ¶
func ParseShort02Time ¶
func ParseShortTime ¶
func ParseTimeStr ¶
func SetSubtract ¶ added in v0.0.8
func SetSubtract[T comparable, V any](a map[T]V, b map[T]struct{}) (res map[T]V)
func SliceDelete ¶ added in v0.0.8
func TrimExtensionAndGetEpi ¶
TrimExtensionAndGetEpi trim the rename file ext and name eg: example xxxS01E02 => S01E02
Types ¶
type ListView ¶ added in v0.0.8
type ListView[T any] struct { // contains filtered or unexported fields }
ListView is a thread-safe list view that allows only a single goroutine to append elements while permitting multiple goroutines to read concurrently. This data structure is particularly useful when sharing a list across multiple goroutines where only one goroutine is responsible for adding new elements.
func NewListView ¶ added in v0.0.8
type StringAppender ¶ added in v0.0.8
func (*StringAppender) Append ¶ added in v0.0.8
func (sa *StringAppender) Append(ss ...string)
Click to show internal directories.
Click to hide internal directories.