helpers

package
v0.0.0-...-6599ed9 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ciphertext []byte, keystring string) ([]byte, error)

func Encrypt

func Encrypt(plaintext []byte, keystring string) ([]byte, error)

func HexStr2int

func HexStr2int(hexStr string) (int, error)

HexStr2int converts hex format string to decimal number.

func Int2HexStr

func Int2HexStr(num int) (hex string)

Int2HexStr converts decimal number to hex format string.

func JsonEncode

func JsonEncode(v interface{}) string

func Md5

func Md5(source string) string

func Md5File

func Md5File(file io.Reader) string

func PathExists

func PathExists(path string) (bool, error)

func PowInt

func PowInt(x int, y int) int

PowInt is int type of math.Pow function.

func ToStr

func ToStr(value interface{}, args ...int) (s string)

Convert any type to string.

Types

type StrTo

type StrTo string

Convert string to specify type.

func (StrTo) Exist

func (f StrTo) Exist() bool

func (StrTo) Int

func (f StrTo) Int() (int, error)

func (StrTo) Int64

func (f StrTo) Int64() (int64, error)

func (StrTo) MustInt

func (f StrTo) MustInt() int

func (StrTo) MustInt64

func (f StrTo) MustInt64() int64

func (StrTo) MustUint8

func (f StrTo) MustUint8() uint8

func (StrTo) String

func (f StrTo) String() string

func (StrTo) Uint

func (f StrTo) Uint() (uint, error)

func (StrTo) Uint8

func (f StrTo) Uint8() (uint8, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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