utils

package
v0.0.0-...-16924cb Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const OsuFilenameRegex = `^(?P<beatmapsetId>\d+)\s+(?P<artist>[\x00-\xff]+)\s+-\s+(?P<name>.+)\.osz$`

Variables

This section is empty.

Functions

func Btoi

func Btoi(b bool) int

func GetLimitSecond

func GetLimitSecond(sleep string, ctx context.Context) (time.Duration, context.Context, error)

func In

func In[T comparable](array []T, element T) bool

func Itob

func Itob(i int) bool

func MakeFilename

func MakeFilename(beatmapsetId int, artist, name string) string

func MustParseTime

func MustParseTime(date string, format string) time.Time

func ParseFilename

func ParseFilename(filename string) (artist, name string, beatmapsetId int)

func Reverse

func Reverse(s string) string

func SanitizeFileName

func SanitizeFileName(fileName string) string

func SplitSlice

func SplitSlice[T any](s []T, n int) [][]T

func XDGDataHome

func XDGDataHome(app string) string

func XDGHome

func XDGHome() string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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