util

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 17 Imported by: 2 modules, 9 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToUint64

func BytesToUint64(v []byte) (uint64, error)

func CheckRequiredFlag

func CheckRequiredFlag(cmd *cobra.Command, names ...string)

func CopyFile

func CopyFile(src, dst string) error

func Ecrecover

func Ecrecover(hash, v, r, s []byte) ([]byte, error)

Ecrecover returns the uncompressed public key that created the given signature.

func EcrecoverAddress

func EcrecoverAddress(hash, v, r, s []byte) (common.Address, error)

func ExternalIP

func ExternalIP() (string, error)

https://stackoverflow.com/questions/23558425/how-do-i-get-the-local-ip-address-in-go TODO there must be a better way to get external IP

func Keccak256 added in v0.2.0

func Keccak256(msg []byte) ([]byte, error)

func PrvKeyToCryptoKey

func PrvKeyToCryptoKey(prv *ecdsa.PrivateKey) crypto.PrivKey

func SetEnvToViper

func SetEnvToViper(vp *viper.Viper, key string) []string

func Sha256 added in v0.2.0

func Sha256(msg []byte) []byte

func TxHash

func TxHash(b []byte) []byte

func Uint64ToBytes

func Uint64ToBytes(u uint64) []byte

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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