utils

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string) (int64, error)

func Map

func Map[T any, M any](s []T, f func(T) M) []M

func RandomString

func RandomString(n int) string

Types

type ByteValue

type ByteValue int64

func (ByteValue) String

func (r ByteValue) String() string

type Checksum added in v0.0.10

type Checksum [32]byte

comparable

func FileChecksum added in v0.0.10

func FileChecksum(name string) Checksum

SHA256 hash for file content. for any error, return empty hash

func ReaderChecksum added in v0.0.10

func ReaderChecksum(reader io.Reader) Checksum

func (Checksum) String added in v0.0.10

func (r Checksum) String() string

type HashValue

type HashValue []byte

func HashSum

func HashSum(a []HashValue) (sum HashValue)

Jump to

Keyboard shortcuts

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