package
Version:
v0.1.4
Opens a new window with list of versions in this module.
Published: May 14, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
returns a human-readable size format for the given number of bytes.
const (
KB ByteSize = 1 << (10 * iota)
MB
GB
TB
PB
EB
ZB
YB
)
String returns a human-readable representation of a ByteSize.
Cache represents a least recently used (LRU) cache.
New creates a new LRU cache with the specified size.
Get retrieves the value associated with the given key.
Put adds or updates a key-value pair in the cache.
SizeOf returns the approximate memory usage in bytes of the cache.
type Entry struct {
Key interface{}
Value interface{}
}
Entry represents a key-value pair in the cache.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.