util

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDiff

func CheckDiff(old interface{}, new interface{}, fieldsToSkip map[string]bool) []string

CheckDiff checks what fields have been changed. Only checks "String", "Int" and "Float64" types.

func FormatTime

func FormatTime(t time.Time) string

FormatTime formats time in UK format.

func IsAcceptedStatus

func IsAcceptedStatus(status string) bool

IsAcceptedStatus checks if the business status is accpeted.

func IsDecimalValid

func IsDecimalValid(num string) bool

IsDecimalValid checks the num is positive value and with up to two decimal places.

func IsValidEmail

func IsValidEmail(email string) bool

IsValidEmail checks if email is valid.

func ParseTime

func ParseTime(s string) time.Time

ParseTime parses string into time.

func ToIDStrings

func ToIDStrings(objIDs []primitive.ObjectID) []string

ToIDStrings converts Object IDs into strings.

Types

This section is empty.

Jump to

Keyboard shortcuts

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