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 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 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 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 ( // HTTPStatusUnprocessableEntity REQUIRE THEM TO DOCUMENT THIS CONST // Deprecated: use http.StatusUnprocessableEntity instead HTTPStatusUnprocessableEntity = 422 // 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 ¶
BeginningOfToday REQUIRE THEM TO DOCUMENT THIS FUNCTION
func BeginningOfTodayIn ¶ added in v2.2.4
BeginningOfTodayIn REQUIRE THEM TO DOCUMENT THIS FUNCTION
func CheckFloat64JSONData ¶
CheckFloat64JSONData REQUIRE THEM TO DOCUMENT THIS FUNCTION
func CheckInt64JSONData ¶
CheckInt64JSONData REQUIRE THEM TO DOCUMENT THIS FUNCTION
func CheckStringJSONData ¶
CheckStringJSONData REQUIRE THEM TO DOCUMENT THIS FUNCTION
func DSN2Publishable ¶
DSN2Publishable REQUIRE THEM TO DOCUMENT THIS FUNCTION
func Fill ¶ added in v2.1.0
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 IsPointer ¶
func IsPointer(arg interface{}) bool
IsPointer REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ParseBoolToString ¶
ParseBoolToString REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ParseDateStringToTime ¶
ParseDateStringToTime REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ParseDateYearMonthDay ¶
ParseDateYearMonthDay REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ParseIntOrReturnZero ¶
ParseIntOrReturnZero REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ParseIntToBool ¶
ParseIntToBool REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ParseStringToBool ¶
ParseStringToBool REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ParseStringToInt ¶
ParseStringToInt REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ParseStringToInt64 ¶
ParseStringToInt64 REQUIRE THEM TO DOCUMENT THIS FUNCTION
func RemoveNanoseconds ¶
RemoveNanoseconds REQUIRE THEM TO DOCUMENT THIS FUNCTION
func StringToIntSlice ¶ added in v2.2.0
StringToIntSlice REQUIRE THEM TO DOCUMENT THIS FUNCTION
func StringToStringSlice ¶ added in v2.2.0
StringToStringSlice REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ToInt64Slice ¶
ToInt64Slice REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ToIntSlice ¶
ToIntSlice REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ToStringSlice ¶
ToStringSlice REQUIRE THEM TO DOCUMENT THIS FUNCTION
func ToStringSlice64 ¶
ToStringSlice64 REQUIRE THEM TO DOCUMENT THIS FUNCTION