Documentation ¶
Index ¶
- Constants
- Variables
- func ConcatArrUint32(r []uint32) string
- func ConcatArrUint64(r []uint64) string
- func ConcatCopyPreAllocate(slices [][]byte) []byte
- func DoHTTP(client *http.Client, req *http.Request) (resp []byte, isTimeout bool, statusCode int, err error)
- func ExtractYoutubeVideoID(url string) string
- func GetVNTelcoByPhone(phone string) string
- func HTTPPost(client *http.Client, uri string, data url.Values) (resp []byte, err error)
- func Hash(hash crypto.Hash, toHash []byte) []byte
- func Int16ToBytes(num int16) []byte
- func Int32ToBytes(num int32) []byte
- func Int64ToBytes(num int64) []byte
- func IsATMCard(cardScheme string) bool
- func IsUnicode(input string) bool
- func MakeURL(scheme, host, path string, args url.Values) string
- func MakeYoutubeEmbedLink(url string) string
- func MonthBetween(t1, t2 time.Time) int
- func Normalize(email string) string
- func PrettyJSON(data interface{}) (string, error)
- func Round(num float64) int
- func StandardizePhone(phone string) string
- func StripNonAlphabet(input string) string
- func ToFixed(num float64, precision int) float64
- func TransformVietnamese(inp string) string
- func Uint16ToBytes(num uint16) []byte
- func Uint32ToBytes(num uint32) []byte
- func Uint64ToBytes(num uint64) []byte
- func Validate(email string) error
- func ValidateEmailFormat(email string) error
- func ValidateFast(email string) (host string, err error)
- func ValidateVNPhoneNumber(phone string) bool
- func ValidateYoutubeURL(url string) bool
Constants ¶
View Source
const ( SOURCE_CHARACTERS = "" /* 334-byte string literal not displayed */ DESTINATION_CHARACTERS = "" /* 126-byte string literal not displayed */ )
Variables ¶
View Source
var ( ErrInvalidFormat = errors.New("invalid format") ErrUnresolvableHost = errors.New("unresolvable host") )
*
- Code below forged from: https://github.com/goware/emailx
View Source
var (
ErrEmailBadFormat = errors.New("invalid format")
)
Functions ¶
func ConcatCopyPreAllocate ¶
ConcatCopyPreAllocate ..
func DoHTTP ¶
func DoHTTP(client *http.Client, req *http.Request) (resp []byte, isTimeout bool, statusCode int, err error)
DoHTTP do http (GET, PUT, POST ...)
func ExtractYoutubeVideoID ¶
ExtractYoutubeVideoID ...
func MonthBetween ¶
MonthBetween total months between time point
func PrettyJSON ¶
PrettyJSON parse object to json string and make it pretty
func TransformVietnamese ¶
TransformVietnamese into "khong dau"
func ValidateEmailFormat ¶
ValidateEmailFormat validate email format
func ValidateFast ¶
ValidateFast checks format of a given email.
func ValidateVNPhoneNumber ¶
ValidateVNPhoneNumber ...
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.