Categorygithub.com/0xVanfer/utils
modulepackage
0.4.0
Repository: https://github.com/0xvanfer/utils.git
Documentation: pkg.go.dev

# README

Utils

# Functions

Calculate the apy by given apr.
Calculate the apy by given apr.
Calculate the apr by given apy.
Calculate the apr by given apy.
Return the AND result of two arrays.
Return the OR result of two arrays.
Sqrt for big int.
No description provided by the author
Return checksummed ethereum address.
Connect the items in an array with "connector".
Example: ContainAnyOfStrs("abracadabra", []string{"bra", "abr"}) = true ContainAnyOfStrs("abracadabra", []string{"bra", "tnt"}) = false.
Example: ContainAnyOfStrs("abracadabra", []string{"bra", "tnt"}) = true ContainAnyOfStrs("abracadabra", []string{"abc", "tnt"}) = false.
If target contains in array.
If target contains in string array, ignore lower or upper.
Create a pair of private key and address.
Real random/ Crypto random.
Choose "times" different numbers between "start" and "end".
Choose an element randomly from the given array.
No description provided by the author
Find an address contain the target string.
Find an address end with the target string.
Find an address start with the target string.
Find all []byte between "bytesBefore" and "bytesAfter".
Find all string between "strBefore" and "strAfter".
No description provided by the author
No description provided by the author
Get hash and use it as private key, and generate an eth address.
Get the hash of a string.
The first letter to lower case.
Random from timestamp.
Get the maximum one of the input numbers.
No description provided by the author
Get the medium number.
Get the minimum one of the input numbers.
Get the mode(math).
Fill the string to a certain length.
Return if the path exists.
Return if the path is dir.
No description provided by the author
No description provided by the author
From private key to address.
Read the csv file from the given path.
Read json file into []byte and unmarshal into v.
Read json file into []byte.
Read json file into []byte and unmarshal into []string.
Read json file into []byte and convert into string.
Remove sth from an array and return the new one.
Remove the first subStr in str.
Remove repetiton in an array and return the new one.
Recover from panic and restart.
Recover from panic and restart after waiting for a while.
Get the function name running now.
Send simple telegram message.
Seperate a string into an array, the seperater will be deleted.
No description provided by the author
No description provided by the author
Solve the equation(within cubic).
Simple sort.
Simple sort by map value.
Return underline case of str.
No description provided by the author
Consider a map: map[loc]=bool.
Return camel case of str.
Return camel case of str.
Return seperated words of str.
Return title case seperated words of str.
Get the sum.
Consider a map: map[loc]=bool.
The first letter to upper case.
No description provided by the author
Write a new csv file.
Write to csv line by line.
Write to csv line by line.

# Structs

Curve stable coin model.