lib

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrInputIsNotDir     types.Error = "input is not a dir"
	ErrInputPathIsEmpty  types.Error = "input path is empty"
	ErrOutputNameIsEmpty types.Error = "output name is empty"
	ErrOutputExtIsEmpty  types.Error = "output ext is empty"
	ErrDataIsEmpty       types.Error = "data is empty"
)

Variables

View Source
var (
	ErrConfigFileMissing = errors.New("config file missing")
)

Functions

func ColorPrintf

func ColorPrintf(format string, a ...any)

func GetInputPath

func GetInputPath(path string) (string, error)

func GetOutputFileNoExt

func GetOutputFileNoExt(originFile string) string

func GetOutputFileWithExt

func GetOutputFileWithExt(originFile, ext string) string

func InitJSONConfig added in v1.1.5

func InitJSONConfig(receiver any, fileName string)

func InitYAMLConfig added in v1.1.5

func InitYAMLConfig(receiver any, fileName string)

func ReadM3U

func ReadM3U(file string) (s types.Slice[*types.MP3], err error)

func SearchConfigFile added in v1.1.5

func SearchConfigFile(fileName string, searchPaths ...string) (string, error)

func SnowflakeMachineID

func SnowflakeMachineID() uint16

func SnowflakeNode added in v1.1.8

func SnowflakeNode() (*snowflake.Node, error)

func WriteCSV

func WriteCSV(s types.Slice[*types.MP3], outputFile string) error

func WriteChart

func WriteChart(s types.Slice[*types.MP3], outputFile string) error

Types

type City added in v1.1.8

type City struct {
	// contains filtered or unexported fields
}

func IP2City added in v1.1.8

func IP2City(ipv4 string) (*City, error)

func (*City) ContinentCode added in v1.1.8

func (c *City) ContinentCode() string

func (*City) ContinentName added in v1.1.8

func (c *City) ContinentName() string

func (*City) CountryCode added in v1.1.8

func (c *City) CountryCode() string

func (*City) CountryName added in v1.1.8

func (c *City) CountryName() string

func (*City) Name added in v1.1.8

func (c *City) Name() string

func (*City) TimeZone added in v1.1.8

func (c *City) TimeZone() string

Jump to

Keyboard shortcuts

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