Documentation
¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func ClearStringOfCharacters(str string, characters []string) string
- func CompareMapsByStringKeys(map1, map2 map[string]string) bool
- func ConcatSlice(strSlice []string) string
- func GCRunAndPrintMemory()
- func GetConfFromEnvFile(filename string) map[string]string
- func GetIndexByStrValue(data []string, value string) int
- func GetMapKeys(argMap map[string]string) []string
- func GetMapKeysWithValue(mapArg map[string]string) []string
- func GetMapValues(mapArg map[string]string) []string
- func GetMapWithoutKeys(map1 map[string]string, exceptKeys []string) map[string]string
- func HashPassword(password string) (string, error)
- func IsEmail(email string) bool
- func LogInit(path string)
- func Logging(errors ...error)
- func PresenceMapKeysInOtherMap(map1, map2 map[string]string) bool
- func SqlToMap(rows *sql.Rows) []map[string]any
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
CheckPasswordHash returns a boolean value comparing the passed strings (password and hash)
func ClearStringOfCharacters ¶
ClearStringOfCharacters in the passed string, replaces the characters from the passed slice with an empty string.
func CompareMapsByStringKeys ¶
CompareMapsByStringKeys for map-arguments, checks the keys of the first argument that contain non-empty values to see if they are present in the second argument.
func ConcatSlice ¶
ConcatSlice returns a string from the elements of the passed slice with strings. Separator - space.
func GCRunAndPrintMemory ¶
func GCRunAndPrintMemory()
GCRunAndPrintMemory runs a garbage collection and if setting the APP_ENV environment variable as "dev" prints currently allocated number of bytes on the heap.
func GetConfFromEnvFile ¶
GetConfFromEnvFile receives data for the database from the environment file. If successful, returns a non-empty map.
func GetIndexByStrValue ¶
GetIndexByStrValue returns the integer index of the passed value in the passed slice; if the value is missing, then -1.
func GetMapKeys ¶
GetMapKeys returns a slice of the keys of the passed map.
func GetMapKeysWithValue ¶
GetMapKeysWithValue returns from the argument map, a map with keys with non-empty values.
func GetMapValues ¶
GetMapValues from the passed map returns a slice with its non-empty values.
func GetMapWithoutKeys ¶
GetMapWithoutKeys returns the transferred map without the transferred key.
func HashPassword ¶
HashPassword returns the hash of the passed string and a possible error.
func IsEmail ¶
IsEmail returns a boolean value checking the passed string against the pattern of matching the email address.
func LogInit ¶
func LogInit(path string)
LogInit using the passed path string, creates, if missing, a log file and assigns errors to be output to it.
func Logging ¶
func Logging(errors ...error)
Logging writes an indefinite number of transmitted non-empty errors to the log.
func PresenceMapKeysInOtherMap ¶
PresenceMapKeysInOtherMap returns a Boolean answer whether the keys of the first passed card are contained in the second.
Types ¶
This section is empty.