util

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: BSD-3-Clause-Clear Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dotnotation

func Dotnotation(m map[string]interface{}, key string) interface{}

func RelativeFileSizeToBytes added in v0.7.0

func RelativeFileSizeToBytes(size string, defaultSize int64) int64

RelativeFileSizeToBytes converts a human-readable file size string (e.g., "10MB", "2GB") into its equivalent size in bytes as an int64. Supported units are "TB", "GB", "MB", "KB", and "B" (case-insensitive). If the input string cannot be parsed, the function returns the provided `defaultSize`.

Example inputs: "10MB", "2 gb", "512kb", "100b"

Types

This section is empty.

Jump to

Keyboard shortcuts

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