utils

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsyncTaskLoading

func AsyncTaskLoading(task func(), description string)

func CalculateChecksum

func CalculateChecksum(filePath string) (string, error)

func Contains

func Contains(slice []string, item string) bool

func DownloadFile

func DownloadFile(url string, fileName string, outputPath string) error

func GetCRC32

func GetCRC32(filePath string) (string, error)

func GetFileMd5Hash

func GetFileMd5Hash(path string) (string, error)

func GetFullPath

func GetFullPath(relativePath string) (string, error)

func GetHomeDir

func GetHomeDir() string

func HashOpenSubtitles

func HashOpenSubtitles(videoPath string) (string, error)

Types

type Logger

type Logger struct {
	Verbose bool
}

func GetLogger

func GetLogger() *Logger

func NewLogger

func NewLogger(verbose bool) *Logger

func (*Logger) Debug

func (l *Logger) Debug(message string)

func (*Logger) Error

func (l *Logger) Error(message string)

func (*Logger) Info

func (l *Logger) Info(message string)

func (*Logger) JsonDebug

func (l *Logger) JsonDebug(message []byte)

func (*Logger) Warning

func (l *Logger) Warning(message string)

Jump to

Keyboard shortcuts

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