package restutility import ( "strings" "time" "strconv" ) func UnixToDate(input int64) time.Time { return time.Unix(input, 0) } func DateToUnix(input interface{}) int64 { if input != nil { t := input.(time.Time) return t.Unix() } return 0 } func EqualQuotes(input string) string { if input != "" { return " = '" + input + "'" } return "" } func LikeQuotes(input string) string { if input != "" { return " LIKE UPPER('%" + input + "%')" } return "" }