query.go
func AsEnumerable(entries ...interface{}) Enumerable {
	if len(entries) != 1 {
		return enumerableSlice(entries)
	}

	val := reflect.ValueOf(entries[0])

	if kind := val.Kind(); kind == reflect.Slice || kind == reflect.Array {
		return enumerableValue{
			Value: val,
		}
	}
	return enumerableSlice(entries)
}
func AsEnumerable(entries ...interface{}) Enumerable {
	if len(entries) != 1 {
		return enumerableSlice(entries)
	}

	val := reflect.ValueOf(entries[0])

	if kind := val.Kind(); kind == reflect.Slice || kind == reflect.Array {
		return enumerableValue{
			Value: val,
		}
	}
	return enumerableSlice(entries)
}
func AsEnumerable ( entries ... interface { } ) Enumerable { if len ( entries ) != 1 { return enumerableSlice ( entries ) } val := reflect . ValueOf ( entries [ 0 ] ) if kind := val . Kind ( ) ; kind == reflect . Slice || kind == reflect . Array { return enumerableValue { Value : val , } } return enumerableSlice ( entries ) }
// AsEnumerable allows for easy conversion of a slice to a re-usable Enumerable object.
AsEnumerable allows for easy conversion of a slice to a re - usable Enumerable object .