func From(input T) Query {
	var e error
	if input == nil {
		e = ErrNilInput
	}

	out, ok := takeSliceArg(input)
	if !ok {
		e = ErrInvalidInput
		out = nil
	}

	return Query{values: out, err: e}
}
// From initializes a linq query with passed slice as the source.
// input parameter must be a slice. Otherwise returns ErrInvalidInput in
// query result evaluating method.
//
// Example:
//     i := []int{1,2,3,4,5,6}
//     q := From(i)
//
// Note: Although it looks like a T (interface{}) input, you should pass a
// slice of any type. There is a hack there to accept any type of slice, which
// is a workaround of type system of Go.
From initializes a linq query with passed slice as the source.
input parameter must be a slice. Otherwise returns ErrInvalidInput in
query result evaluating method.



Although it looks like a T (interface{}) input, you should pass a
slice of any type. There is a hack there to accept any type of slice, which
is a workaround of type system of Go.
// From initializes a linq query with passed slice as the source . // input parameter must be a slice . Otherwise returns ErrInvalidInput in // query result evaluating method . // // Example : // i : = [] int { 1 2 3 4 5 6 } // q : = From ( i ) // // Note : Although it looks like a T ( interface {} ) input you should pass a // slice of any type . There is a hack there to accept any type of slice which // is a workaround of type system of Go .
func From(input T) Query {
	var e error
	if input == nil {
		e = ErrNilInput
	}
	out, ok := takeSliceArg(input)
	if !ok {
		e = ErrInvalidInput
		out = nil
	}
	return Query{values: out, err: e}
}
func From ( input T ) Query { var e error if input == nil { e = ErrNilInput } out , ok := takeSliceArg ( input ) if ! ok { e = ErrInvalidInput out = nil } return Query { values : out , err : e } }
From initializes a linq query with passed slice as the source.
From initializes a linq query with passed slice as the source .