filebrowser/utils/types.go
Henrique Dias 1cea7a383d aadd first files based on caddy-filemanager
Former-commit-id: 20baeeb41a9555cefc3b31b495e24e907736c443
2017-06-18 13:57:38 +01:00

14 lines
302 B
Go

package utils
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
}