Documentation ¶
Index ¶
- func JSONDecode(content []byte, destinations ...interface{}) (interface{}, error)
- func JSONEncode(source interface{}, unescape bool) ([]byte, error)
- func JSONFormatToReadable(source []byte) ([]byte, error)
- func StringToTime(timeString, format string) (time.Time, error)
- func StringToUnixInt(timeString, format string) int
- func TimeToString(timeValue time.Time, format string) string
- func WaitFor(f func() bool) error
- func WaitForSpecific(f func() bool, timeout time.Duration, waitInterval time.Duration) error
- func WaitForSpecificOrError(f func() (bool, error), timeout time.Duration, waitInterval time.Duration) error
- func YAMLDecode(content []byte, destinations ...interface{}) (interface{}, error)
- func YAMLEncode(source interface{}) ([]byte, error)
- type TimeoutError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONDecode ¶
JSONDecode decode given json byte slice to corresponding struct.
func JSONEncode ¶
JSONEncode encode given interface to json byte slice.
func JSONFormatToReadable ¶
JSONFormatToReadable formats given json byte slice prettily.
func StringToTime ¶
StringToTime transforms given string to time.
func StringToUnixInt ¶
StringToUnixInt transforms given string to unix time int.
func TimeToString ¶
TimeToString transforms given time to string.
func WaitForSpecific ¶
WaitForSpecific wait a function return true.
func WaitForSpecificOrError ¶
func WaitForSpecificOrError(f func() (bool, error), timeout time.Duration, waitInterval time.Duration) error
WaitForSpecificOrError wait a function return true or error.
func YAMLDecode ¶
YAMLDecode decode given yaml byte slice to corresponding struct.
func YAMLEncode ¶
YAMLEncode encode given interface to yaml byte slice.
Types ¶
type TimeoutError ¶
type TimeoutError struct {
// contains filtered or unexported fields
}
TimeoutError An Error represents a timeout error.
func NewTimeoutError ¶
func NewTimeoutError(timeout time.Duration) *TimeoutError
NewTimeoutError create a new TimeoutError
Click to show internal directories.
Click to hide internal directories.