util

package
v0.0.0-...-06bcfdb Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecLinuxShell

func ExecLinuxShell(s string) (string, error)

ExecLinuxShell 执行 linux shell command

func FileMD5

func FileMD5(file *os.File) string

func FileSha1

func FileSha1(file *os.File) string

func GetAllFilesInDirectory

func GetAllFilesInDirectory(dirPath string) ([]string, error)

func GetFileMd5

func GetFileMd5(path string) (string, error)

func GetFileSha1

func GetFileSha1(path string) (string, error)

func GetFileSize

func GetFileSize(filename string) (int64, error)

func MD5

func MD5(data []byte) string

func Merge

func Merge(filePaths []string, outputPath string) error

Merge 合并多个文件

func PathExists

func PathExists(path string) (bool, error)

func Sha1

func Sha1(data []byte) string

Types

type Sha1Stream

type Sha1Stream struct {
	// contains filtered or unexported fields
}

func (*Sha1Stream) Sum

func (obj *Sha1Stream) Sum() string

func (*Sha1Stream) Update

func (obj *Sha1Stream) Update(data []byte)

Jump to

Keyboard shortcuts

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