utils

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReflectUtil reflectUtil
View Source
var StringUtil stringUtil
View Source
var StructUtil structUtil

Functions

func SliceToSlice

func SliceToSlice[T any, U any](from []T, to *[]U) error

Types

type AudioUtil added in v1.7.3

type AudioUtil struct{}

func (*AudioUtil) IsMp3Header added in v1.7.3

func (A *AudioUtil) IsMp3Header(data []byte) bool

func (*AudioUtil) IsValidAudioFile added in v1.7.3

func (a *AudioUtil) IsValidAudioFile(filePath string) bool

func (*AudioUtil) IsWavHeader added in v1.7.3

func (a *AudioUtil) IsWavHeader(data []byte) bool

func (*AudioUtil) TrimMp3File added in v1.7.3

func (a *AudioUtil) TrimMp3File(filePath string, start, length int) ([]byte, error)

裁剪 MP3 文件的指定部分并返回裁剪后的音频数据

func (*AudioUtil) TrimWavFile added in v1.7.3

func (a *AudioUtil) TrimWavFile(filePath string, start, length int) ([]byte, error)

裁剪 WAV 文件的指定部分并返回裁剪后的音频数据

Jump to

Keyboard shortcuts

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