utils

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFile added in v0.7.0

func ExtractFile(urlStr string) (string, error)

ExtractFile extracts the file name from a URL string from an index backup.

func GetDirectorySize added in v0.7.0

func GetDirectorySize(path string) (uint64, error)

GetDirectorySize calculates the total size of a directory and returns it as a human-readable string

func GetSizeHuman added in v0.7.0

func GetSizeHuman(size uint64) string

func NormalizeString

func NormalizeString(s string) string

NormalizeString normalizes a string by converting it to lowercase and replacing spaces and underscores with hyphens.

func ParseDate added in v0.7.0

func ParseDate(date string) string

ParseDate parses a date string in RFC3339 format and returns a formatted string.

func Unzip added in v0.7.0

func Unzip(src, dest string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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