utils

package
v0.0.0-...-a44c12d Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CPU_Counts

func CPU_Counts(logical bool) (int, error)

func CPU_Percent

func CPU_Percent(interval time.Duration, percpu bool) ([]float64, error)

func CaptureFrame

func CaptureFrame(gtx layout.Context, img *image.RGBA) error

func CompactTimeAgo

func CompactTimeAgo(date time.Time) string

func CopyFile

func CopyFile(src string, dest string) error

func CreateFolderPath

func CreateFolderPath(folderPath string) error

func DecodeAddress

func DecodeAddress(value string) (string, error)

func DecodeString

func DecodeString(value string) (string, error)

func FormatBytes

func FormatBytes(value int64) string

func FormatHashRate

func FormatHashRate(hash_rate uint64) string

func GetFolderSize

func GetFolderSize(folderPath string) (int64, error)

func IsAndroid

func IsAndroid() bool

func IsErrLeafNotFound

func IsErrLeafNotFound(err error) bool

func IsIOS

func IsIOS() bool

func IsMobile

func IsMobile() bool

func IsTcpAddrInUse

func IsTcpAddrInUse(addr string) (bool, error)

func MultDiv

func MultDiv(a uint64, b uint64, c uint64) uint64

func NewImageColor

func NewImageColor(size image.Point, color color.RGBA) *image.RGBA

func PaintLinearGradient

func PaintLinearGradient(gtx layout.Context, colorStart color.NRGBA, colorEnd color.NRGBA) clip.Stack

func ReduceAddr

func ReduceAddr(addr string) string

func ReduceString

func ReduceString(s string, maxLeft, maxRight int) string

func ReduceTxId

func ReduceTxId(txId string) string

func SplitString

func SplitString(s string, size int) []string

Types

type ForceActiveLoop

type ForceActiveLoop struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewForceActiveLoop

func NewForceActiveLoop(d time.Duration, updateFunc func()) *ForceActiveLoop

func (*ForceActiveLoop) Close

func (a *ForceActiveLoop) Close()

func (*ForceActiveLoop) SetActive

func (a *ForceActiveLoop) SetActive()

type ReadCloser

type ReadCloser struct {
	io.ReadCloser
}

func (ReadCloser) ReadAll

func (file ReadCloser) ReadAll() (data []byte, err error)

type ShiftNumber

type ShiftNumber struct {
	Number   uint64
	Decimals int
}

func (ShiftNumber) Format

func (s ShiftNumber) Format() string

func (ShiftNumber) LocaleString

func (s ShiftNumber) LocaleString(t language.Tag) string

func (*ShiftNumber) Parse

func (s *ShiftNumber) Parse(value string) error

func (ShiftNumber) Value

func (s ShiftNumber) Value() float64

Jump to

Keyboard shortcuts

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