This commit is contained in:
Henrique Dias
2017-06-24 12:12:15 +01:00
parent 780f1bc16e
commit 9c36dea485
23 changed files with 2408 additions and 0 deletions

13
variables/types.go Normal file
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
}