Documentation ¶
Index ¶
- Constants
- func BeginningOfToday() time.Time
- func BeginningOfTodayIn(loc *time.Location) time.Time
- func CheckFloat64JSONData(f float64) *float64
- func CheckInt64JSONData(i int64) *int64
- func CheckStringJSONData(s string) *string
- func DSN2MAP(dsn string) map[string]string
- func DSN2Publishable(dsn string) string
- func DiffDays(date1 time.Time, date2 time.Time) (int64, error)
- func ErrorGroup(ctx context.Context, args ...func() error) error
- func Fill(dest interface{}, src interface{})
- func GetByteArrayAndBufferFromRequestBody(body io.ReadCloser) ([]byte, *bytes.Buffer, error)
- func GetOnlyNumbers(s *string) *string
- func GetOnlyNumbersOrSpecial(s *string, sp string) *string
- func GetStringBodyHTTPRequest(r *http.Request) *string
- func GetStringBodyHTTPRequestJSON(r *http.Request) *string
- func GetStringBodyHTTPResponse(r *http.Response) *string
- func GetStringBodyHTTPResponseJSON(r *http.Response) *string
- func IsArray(arg interface{}) bool
- func IsPointer(arg interface{}) bool
- func IsString(arg interface{}) bool
- func Join(sep string, args ...interface{}) string
- func ParseBoolToString(b bool) string
- func ParseDateStringToTime(dateString string) (*time.Time, error)
- func ParseDateYearMonthDay(dateString string) (time.Time, error)
- func ParseIntOrReturnZero(s string) int
- func ParseIntToBool(i int) bool
- func ParseStringToBool(s string) bool
- func ParseStringToFloat64(s string) (float64, error)
- func ParseStringToInt(s string) (int, error)
- func ParseStringToInt64(s string) (int64, error)
- func RandomInt(bottom, top int) int
- func RemoveNanoseconds(date time.Time) (time.Time, error)
- func Round(value float64, precision int) float64
- func StringToIntSlice(s string) []int
- func StringToStringSlice(s string) []string
- func ThisBytesContains(b []byte, s string) bool
- func ToInt64Slice(stringSlice []string) (int64Slice []int64)
- func ToIntSlice(stringSlice []string) (intSlice []int)
- func ToStringSlice(intslice []int) (stringSlice []string)
- func ToStringSlice64(int64Slice []int64) (stringSlice []string)
- func Truncate(s string, i int) (r string)
- type Stringer
Constants ¶
const ( // DatePatternYYYYMMDD REQUIRE THEM TO DOCUMENT THIS CONST // 2006 = Year with four digits // 01 = Month with two digits // 02 = Day with two digits DatePatternYYYYMMDD = "2006-01-02" // DatePatternYYYYMMDDHHMMSS REQUIRE THEM TO DOCUMENT THIS CONST // 2006 = Year with four digits // 01 = Month with two digits // 02 = Day with two digits // 15 = Hour with two digits (24h) // 04 = Minute with two digits // 05 = Seconds with two digits DatePatternYYYYMMDDHHMMSS = "2006-01-02 15:04:05" // DatePatternYYYYMMDDTHHMMSS REQUIRE THEM TO DOCUMENT THIS CONST // 2006 = Year with four digits // 01 = Month with two digits // 02 = Day with two digits // 15 = Hour with two digits (24h) // 04 = Minute with two digits // 05 = Seconds with two digits DatePatternYYYYMMDDTHHMMSS = "2006-01-02T15:04:05" DatePatternYYYYMMDDTHHMMSSZ = time.RFC3339 )
Variables ¶
This section is empty.
Functions ¶
func BeginningOfToday ¶
func CheckFloat64JSONData ¶
func CheckInt64JSONData ¶
func CheckStringJSONData ¶
func DSN2Publishable ¶
func ErrorGroup ¶
ErrorGroup resolves all go routines. It fails at first error encountered warning: Creating goroutines in the args will cause them to run in background
func Fill ¶
func Fill(dest interface{}, src interface{})
Fill merges data from struct instance to another By @titpetric suggested in https://scene-si.org/2016/06/01/golang-tips-and-tricks
func GetByteArrayAndBufferFromRequestBody ¶
GetByteArrayAndBufferFromRequestBody REQUIRE THEM TO DOCUMENT THIS FUNCTION
func GetOnlyNumbers ¶
GetOnlyNumbers REQUIRE THEM TO DOCUMENT THIS FUNCTION
func GetOnlyNumbersOrSpecial ¶
GetOnlyNumbersOrSpecial REQUIRE THEM TO DOCUMENT THIS FUNCTION
func GetStringBodyHTTPRequest ¶
GetStringBodyHTTPRequest REQUIRE THEM TO DOCUMENT THIS FUNCTION
func GetStringBodyHTTPRequestJSON ¶
GetStringBodyHTTPRequestJSON REQUIRE THEM TO DOCUMENT THIS FUNCTION
func GetStringBodyHTTPResponse ¶
GetStringBodyHTTPResponse REQUIRE THEM TO DOCUMENT THIS FUNCTION
func GetStringBodyHTTPResponseJSON ¶
GetStringBodyHTTPResponseJSON REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ParseBoolToString ¶
func ParseDateStringToTime ¶
ParseDateStringToTime REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ParseDateYearMonthDay ¶
ParseDateYearMonthDay REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ParseIntOrReturnZero ¶
func ParseIntToBool ¶
func ParseStringToBool ¶
func ParseStringToFloat64 ¶
ParseStringToFloat64 parse the string to float64
func ParseStringToInt ¶
func ParseStringToInt64 ¶
func RemoveNanoseconds ¶
RemoveNanoseconds REQUIRE THEM TO DOCUMENT THIS FUNCTION