Documentation
¶
Overview ¶
Package misc defines miscellaneous useful functions
Index ¶
- func Atoi(candidate string) int
- func IsSuccessHTTPRequest(t *testing.T, actual *http.Response, err error) bool
- func NVL(str string, def string) string
- func ParseBool(candidate string) bool
- func ParseCsvLine(data string) []string
- func ParseDuration(candidate string) time.Duration
- func ParseHTTPResponse(res *http.Response) (string, int)
- func ParseUint16(candidate string) uint16
- func ReadFromFile(path string, data interface{}) error
- func SaveAsFile(path string, data interface{}) error
- func ShellExec(command []string) (result string, err error)
- func StringToTime(t string) time.Time
- func TimeToJST(t time.Time) time.Time
- func TimeToString(t time.Time) string
- func ZeroOrNil(obj interface{}) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSuccessHTTPRequest ¶
IsSuccessHTTPRequest checks whether the HTTP request was success.
func ParseCsvLine ¶
ParseCsvLine returns comma splitted strings
func ParseDuration ¶
ParseDuration returns casted time.Duration
func ParseHTTPResponse ¶
ParseHTTPResponse parses a HTTP response to string.
func ReadFromFile ¶
ReadFromFile reads data from a file
func SaveAsFile ¶
SaveAsFile saves data as a file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.