gokit

package module
v0.0.0-...-fe58d70 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SIZE_KB = 1024
	SIZE_MB = 1024 * SIZE_KB
	SIZE_GB = 1024 * SIZE_MB
	SIZE_TB = 1024 * SIZE_GB
	SIZE_PB = 1024 * SIZE_TB
)

Variables

This section is empty.

Functions

func FormatBytesToString

func FormatBytesToString(size int64) string

FormatBytesToString 格式化数据大小

如:123456789 -> 117.738MB

func ListenQuitSignal

func ListenQuitSignal(ctx context.Context, done func())

ListenQuitSignal 监听退出信号

Types

type Float

type Float interface {
	float32 | float64
}

Float 定义浮点型的数据类型

type Int

type Int interface {
	int | int8 | int16 | int32 | int64
}

Int 定义有符号整型的数据类型

type Number

type Number interface {
	Int | Uint | Float
}

Number 定义数值型的数据类型(包括有符号整型、无符号整型、浮点型)

type Uint

type Uint interface {
	uint | uint8 | uint16 | uint32 | uint64
}

Uint 定义无符号整型的数据类型

Directories

Path Synopsis
network
ssh

Jump to

Keyboard shortcuts

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