tools

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomBytes

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

***************************************************************************************

*
* Function : GenerateRandomBytes
*
*  Purpose : Generate Random Bytes for reference purpose
*
*    Input : n int - specify size of the buffer
*
*	 Return : []]byte - securely generated random bytes
*			  error - if happened, nil otherwise

func GenerateRandomString

func GenerateRandomString(n int) (string, error)

***************************************************************************************

*
* Function : GenerateRandomString
*
*  Purpose : Generate Random String for reference purpose
*
*    Input : n int - size of the returning string
*
*	 Return : string - securely generated random string
*			  error - if happened, nil otherwise

func GenerateRandomStringURLSafe

func GenerateRandomStringURLSafe(n int) (string, error)

***************************************************************************************

*
* Function : GenerateRandomStringURLSafe
*
*  Purpose : Generate URL-safe, base64 encoded random string
*
*    Input : n int - size of the returning string
*
*	 Return : string - securely generated random bytes
*			  error - if happened, nil otherwise

func GetGoID

func GetGoID() int

***************************************************************************************

*
* Function : GetGoID
*
*  Purpose : Get ID of gorutine
*
*   Input : Nothing
*
*  Return : Return ID in int format

Types

This section is empty.

Jump to

Keyboard shortcuts

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