mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-08 11:22:10 +00:00
14 lines
308 B
Go
14 lines
308 B
Go
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
|
|
}
|