utils

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 6 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

type Checksum [32]byte

comparable

func FileChecksum

func FileChecksum(name string) Checksum

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

func ReaderChecksum

func ReaderChecksum(reader io.Reader) Checksum

func (Checksum) String

func (r Checksum) String() string

type CtntType

type CtntType int
const (
	Cplain CtntType = iota
	Cbinary
	Csource
)

type HashValue

type HashValue []byte

func HashSum

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

type LangTag

type LangTag int
const (
	Lcpp LangTag = iota
	Lcpp11
	Lcpp14
	Lcpp17
	Lcpp20
	Lpython2
	Lpython3
	Lgo
	Ljava
	Lc
)

Jump to

Keyboard shortcuts

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