filebrowser/frontmatter/types.go

14 lines
308 B
Go
Raw Normal View History

2017-06-19 16:10:03 +00:00
package frontmatter
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
}