filebrowser/utils/types.go

14 lines
302 B
Go
Raw Normal View History

2016-10-18 20:30:10 +00:00
package utils
2016-06-23 22:21:44 +00:00
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
}