utils

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsArrayOfInt

func AsArrayOfInt(arr []interface{}) []int

func AsArrayOfString

func AsArrayOfString(arr []interface{}) []string

func ContainsInt

func ContainsInt(array []int, element int) bool

func ContainsString

func ContainsString(array []string, element string) bool

func GetMD5Hash

func GetMD5Hash(text string) string

func IsEqualArray

func IsEqualArray(a, b []Equatable) bool

func IsValidEmail

func IsValidEmail(value string) bool

func IsValidPhone

func IsValidPhone(value string) bool

func UnwrapOrDefaultBool

func UnwrapOrDefaultBool(value *bool, d bool) bool

func UnwrapOrDefaultInt

func UnwrapOrDefaultInt(value *int, d int) int

func UnwrapOrDefaultInt64

func UnwrapOrDefaultInt64(value *int64, d int64) int64

func UnwrapOrDefaultString

func UnwrapOrDefaultString(value *string, d string) string

Types

type Equatable

type Equatable interface {
	// contains filtered or unexported methods
}

type Hashable

type Hashable interface {
	GetHash() string
}

Jump to

Keyboard shortcuts

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