package
1.1.0
Repository: https://github.com/escanbe/go-lib.git
Documentation: pkg.go.dev

# Functions

AbsInt returns the Absolute value of the input int32.
AbsInt64 returns the Absolute value of the input int64.
AnyOf returns true if the `inAny` set contains the input `source`.
BuildIbcDenom returns IBC denom based on algorithm provided by IBC docs: Sha256(path/baseDenom).
CheckPortIsTcpOpen returns if port is not open for TCP mode.
ConditionalInt returns int based on input expression.
ConditionalInt64 returns int64 based on input expression.
ConditionalString returns string based on input expression.
ConvertFromHexNumberStringToDecimalString returns decimal representation in string value of input hex value.
No description provided by the author
DiffMs returns offset amount between the current epoch milliseconds and supplied epoch from the `previous` arg.
DiffS returns offset amount between the current epoch seconds and supplied epoch from the `previous` arg.
ExecuteRemoteCommandViaSSH performs execution of remote command on target server, it returns the output string of the execution and an error if any.
ExitIfErr exit the application with error code = 1.
ExtractHostAndPort return the host name (domain) with port number from input uri.
ExtractHostAndPortOrKeep return the host name (domain) with port number from input uri.
FirstNonBlankString returns the first string which does not blank.
FirstNonEmptyString returns the first string which does not empty.
FormatInt formats the number with comma separates thousands, eg 1000 => 1,000.
FormatInt64 formats the number with comma separates thousands, eg 1000 => 1,000.
FromContractResponseBufferToAddress convert response from smart contract response into address.
FromContractResponseBufferToHash convert response from smart contract response into hash.
FromContractResponseBufferToString convert response from smart contract response into string.
FromContractResponseStringToAddress convert response from smart contract response into address.
FromContractResponseStringToHash convert response from smart contract response into hash.
FromContractResponseStringToString convert response from smart contract response into string.
No description provided by the author
GetKeys returns keys of map as a slice.
GetKeysOf returns slide of keys which has value equals with expected value.
GetKeysOfTrue returns slide of keys which has value is true.
GetLocationFromUtcTimezone returns location corresponding to specified UTC-based timezone.
GetMapValues returns slide of all values of the map.
GetUniqueElements returns a distinct slide based on input.
GetUtcName returns naming convention of UTC timezone.
Int64ToString converts the input int64 into a string.
IntToString converts the input int32 into a string.
IsBlank returns true if the string is a blank string (not contains any character other than space and tab).
IsHttpStatusCodeIndicatesClientError returns true if Http Status Code is 4xx.
IsHttpStatusCodeIndicatesInformational returns true if Http Status Code is 1xx.
IsHttpStatusCodeIndicatesRedirection returns true if Http Status Code is 3xx.
IsHttpStatusCodeIndicatesServerError returns true if Http Status Code is 5xx.
IsHttpStatusCodeIndicatesSuccess returns true if Http Status Code is 2xx.
IsPassphraseCanDecryptPrivateKey returns true if the provided passphrase can decrypt the encrypted privateKey.
IsTimeNear returns true when t1 and t2, are the same time (maximum diff is offset), regardless timezone.
IsTrimmable returns true if the trimmed version of the string is different with the original one.
IsValidEnsNode returns true if input node is valid lowercase hex 32 byte string with 0x as prefix.
IsValidHexNumber returns true if input is a valid hex.
Keccak256Hash computes and returns Keccak-256 value of an input string.
MaxInt returns the greater int32.
MaxInt64 returns the greater int64.
MinInt returns the lower int32.
MinInt64 returns the lower int64.
NameHash returns keccak256 value of input domain (to be used to procedure a node).
NewMasterProfiler returns a new profiler instance.
NilOrWrapIfError returns wrapped input error and message.
NowMs returns the current epoch milliseconds.
NowS returns the current epoch seconds.
Paging returns split original slide into multiple batches.
PanicIfErr raises a panic.
PrintfStdErr does printf to StdErr.
PrintlnStdErr does println to StdErr.
PrintStdErr does print to StdErr.
PutAllToMapAsKeys puts all elements from slice into the map, override duplicated elements.
PutToMapAsKeys puts elements from slice into the map.
RemoveEmptyString takes a slice and return another slice without blank elements.
Sha256 returns SHA256 checksum string value of an input string.
SliceToMap converts the slice into a map[K]V with value as provided.
SliceToTracker converts the slice into a map[K]bool with all values are `true`.
SoftCloneMap returns a cloned map, the value will be assigned to the new map.
Uts46ToAscii is to convert input into Ascii version follow IDN UTS46 spec.
Uts46ToUnicode is to convert input into Unicode version follow IDN UTS46 spec.
ValidateEnsDomain to check whether input domain is valid or not.

# Constants

AcceptAllAndOverrideDuplicatedKeys means all slice elements will be put into map as key and the value will be overridden by provided default value.
AcceptOnlyDuplicatedKeysAndOverrideThem means will take only slice elements which were already exists, and override their value with provided default value.
RejectAllWhenAnyDuplicatedKey means if any element of slice already exists on map, no key will be added.
SkipDuplicatedKeys means all slice elements will be put into map as key, except elements which were already exists.

# Structs

Profiler is used to record execution time and support ultimately depth of children methods.
No description provided by the author
No description provided by the author

# Type aliases

PutToMapAsKeyBehavior defines behavior when put slice element to map.