cast
cast copied to clipboard
Add helper functions for checking data types
I like your project a lot. Although I know this project is dedicated to cast variables from one data type to another, it would be nice to have some helper functions to simplify the checking of a variable's data type such as the following function:
func IsArray(v interface{}) bool {
rv := reflect.ValueOf(v)
return rv.Kind() == reflect.Array || rv.Kind() == reflect.Slice
}