tools

package
v1.1.48 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(encryptBs []byte, keyStr string) ([]byte, error)

func DownloadFile added in v1.1.21

func DownloadFile(ctx context.Context, url string) ([]byte, error)

func DownloadFileToStream added in v1.1.21

func DownloadFileToStream(ctx context.Context, url string) (io.ReadCloser, error)

download file return ReadCloser

defer r.Close()

func Prettify

func Prettify(i interface{}) string

Prettify returns the string representation of a value.

func TsToTime

func TsToTime(ts string) (time.Time, error)

Types

type DecryptErr

type DecryptErr struct {
	Message string
}

func (DecryptErr) Error

func (e DecryptErr) Error() string

Jump to

Keyboard shortcuts

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