utils

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatBytes

func FormatBytes(bytes, decimals int) string

Formats bytes as a human-readable string with the specified number of decimal places.

func FormatFloat

func FormatFloat(f float64) string

Convert the float to a string, trimming unnecessary zeros

func FormatHashes

func FormatHashes(h float64) string

Formats a hash value (h) into human readable format.

This function was adapted from jtgrassie/monero-pool project. Source: https://github.com/jtgrassie/monero-pool/blob/master/src/webui-embed.html

Copyright (c) 2018, The Monero Project

func TimeSince

func TimeSince(timestamp int64) string

TimeSince converts an int64 timestamp to a relative time string

Types

This section is empty.

Jump to

Keyboard shortcuts

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