Documentation
¶
Index ¶
- func ConvertString(s string) interface{}
- func ConvertStringTo(s string, t interface{}) interface{}
- func ForceArray(i interface{}) []interface{}
- func ForceBool(inf interface{}) (bool, bool)
- func ForceFloat(i interface{}) (float64, bool)
- func ForceInt(inf interface{}) (int64, bool)
- func ForceString(i interface{}) string
- func ToArray(a interface{}) ([]interface{}, bool)
- func ToBool(i interface{}) (bool, bool)
- func ToFloat(i interface{}) (float64, bool)
- func ToInt(i interface{}) (int64, bool)
- func ToString(i interface{}) (string, bool)
- type Queue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertString ¶
func ConvertString(s string) interface{}
convert string to different datatype. currectly support only int64, float64, and boolean if cannot pass it will return input string
func ConvertStringTo ¶
func ConvertStringTo(s string, t interface{}) interface{}
convert string to different datatype base on input type. currectly support only int, uint, float, bool, and array. for int, uint and float: this function will always return 64 bits.
func ForceArray ¶
func ForceArray(i interface{}) []interface{}
ForceArray will force to convert interface{} to array of interface{}
func ForceFloat ¶
ForceFloat will force to convert interface{} to float
func ForceString ¶
func ForceString(i interface{}) string
ForceString will force to convert interface{} to string
func ToArray ¶
func ToArray(a interface{}) ([]interface{}, bool)
ToArray will try to convert interface{} to array of interface{}
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func ToLimitQueue ¶
ToLimitQueue will try to convert array to limit queue
func (*Queue) Dequeue ¶
If queue size is exceed limit, remove oldest data return true if data got removed