Former-commit-id: 9c36dea485
This commit is contained in:
Henrique Dias committed 2017-06-24 12:12:15 +01:00
1 parent b0e81a80a0
commit 850c4a10e1
23 files changed
+2408

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
package variables
import "reflect"
// IsMap checks if some variable is a map
func IsMap(sth interface{}) bool {
return reflect.ValueOf(sth).Kind() == reflect.Map
}
// IsSlice checks if some variable is a slice
func IsSlice(sth interface{}) bool {
return reflect.ValueOf(sth).Kind() == reflect.Slice
}