tools

package
v0.0.0-...-46352cc Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareJSON

func CompareJSON(j1, j2 string) (bool, error)

func Contains

func Contains(array []string, s string) bool

func Copy

func Copy(src *url.URL) *url.URL

func CopyJSON

func CopyJSON(a interface{}, b interface{})

func GenerateRandomBytes

func GenerateRandomBytes(n int) ([]byte, error)

GenerateRandomBytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.

func GenerateRandomStringBase64

func GenerateRandomStringBase64(s int) (string, error)

GenerateRandomString returns a URL-safe, base64 encoded securely generated random string.

func HashCode

func HashCode(h interface{}) uint64

func RandSeq

func RandSeq(n int) string

* Generates a random string with n characters length base58

func ToInterface

func ToInterface(myMap map[string]interface{}, resultData interface{}) error

func ToJSON

func ToJSON(v interface{}) (string, error)

func ToMap

func ToMap(v interface{}) (map[string]interface{}, error)

func UniqueSlice

func UniqueSlice(input []string) []string

func UniqueStructSlice

func UniqueStructSlice(input []interface{}) []interface{}

func Validate

func Validate(t interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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