fn

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateRealSize added in v0.0.7

func CalculateRealSize(v interface{}) int

计算真实数据总和

func ConvertByJSON added in v0.0.7

func ConvertByJSON[A any, B any](input A) (B, error)

ConvertByJSON Convert 转换任意类型 A 到类型 B

func DownloadToTempDir

func DownloadToTempDir(url string) (*os.File, error)

func FileExists

func FileExists(filePath string) bool

func Filter added in v0.0.7

func Filter[T any](endpoints []T, f func(endpoint T) bool) []T

func GzipCompress

func GzipCompress(input []byte) []byte

func GzipDecompress

func GzipDecompress(input []byte) []byte

func IsEmpty

func IsEmpty(s string) bool

func SaveToWAVFile

func SaveToWAVFile(filename string, data []byte) (*os.File, error)

func SendFileChunks

func SendFileChunks(file *os.File, firstSize int, chunkSize int, ch chan []byte)

func SimplifyHeader added in v0.0.7

func SimplifyHeader(header map[string][]string) map[string]string

SimplifyHeader 压缩 Header

func Ternary

func Ternary[T any](cond bool, trueVal T, falseVal T) T

Ternary 三元表达式

Types

This section is empty.

Jump to

Keyboard shortcuts

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