// divide Setting into correct query
divide Setting into correct query
// divide Setting into correct query
func (c *Client) reflect(types string, i interface{}) (arr []F) {
	tt := reflect.ValueOf(i)
	l := tt.Len()
	switch reflect.TypeOf(i).Elem().Name() {
	case "Setting":
		cons := i.([]Setting)
		for n := 0; n < l; n++ {
			if tt.Index(n).Elem().Type().Name() == "Not" {
				c.mustnot = append(c.mustnot, Not{types: cons[n]})
				continue
			}
			arr = append(arr, F{types: cons[n]})
		}
	case "F":
		fs := i.([]F)
		for n := 0; n < l; n++ {
			arr = append(arr, F{types: fs[n]})
		}
	case "Not":
		fs := i.([]Not)
		for n := 0; n < l; n++ {
			c.mustnot = append(c.mustnot, Not{types: fs[n]})
		}
	}
	return
}
func ( c * Client ) reflect ( types string , i interface { } ) ( arr [ ] F ) { tt := reflect . ValueOf ( i ) l := tt . Len ( ) switch reflect . TypeOf ( i ) . Elem ( ) . Name ( ) { case " " : cons := i . ( [ ] Setting ) for n := 0 ; n < l ; n ++ { if tt . Index ( n ) . Elem ( ) . Type ( ) . Name ( ) == " " { c . mustnot = append ( c . mustnot , Not { types : cons [ n ] } ) continue } arr = append ( arr , F { types : cons [ n ] } ) } case " " : fs := i . ( [ ] F ) for n := 0 ; n < l ; n ++ { arr = append ( arr , F { types : fs [ n ] } ) } case " " : fs := i . ( [ ] Not ) for n := 0 ; n < l ; n ++ { c . mustnot = append ( c . mustnot , Not { types : fs [ n ] } ) } } return }
divide Setting into correct query
divide Setting into correct query