// ToSlice - returns slice of actions from the action set.
3446
func (actionSet ActionSet) ToSlice() []Action {
	actions := []Action{}
	for action := range actionSet {
		actions = append(actions, action)
	}

	return actions
}
383514
func addressableSlice(slice interface{}) reflect.Value {
	v := reflect.ValueOf(slice)
	p := reflect.New(v.Type())
	p.Elem().Set(v)
	return p.Elem()
}
230901
func (i IdentifierSet) ToOrderedSlice() []Identifier {
	var s []Identifier
	for v := range i {
		s = append(s, v)
	}
	sort.Sort(identifierSorter(s))
	return s
}
192502
func (set TargetIDSet) ToSlice() []TargetID {
	keys := make([]TargetID, 0, len(set))
	for k := range set {
		keys = append(keys, k)
	}
	return keys
}
1279150
func ToSliceE(i interface{}) ([]interface{}, error) {
	var s []interface{}

	switch v := i.(type) {
	case []interface{}:
		return append(s, v...), nil
	case []map[string]interface{}:
		for _, u := range v {
			s = append(s, u)
		}
		return s, nil
	default:
		return s, fmt.Errorf("unable to cast %#v of type %T to []interface{}", i, i)
	}
}
316164
func (l *Language) GetStringSlice(key string) []string {
	return cast.ToStringSlice(l.Get(key))
}
1334749
func ToDurationSliceE(i interface{}) ([]time.Duration, error) {
	if i == nil {
		return []time.Duration{}, fmt.Errorf("unable to cast %#v of type %T to []time.Duration", i, i)
	}

	switch v := i.(type) {
	case []time.Duration:
		return v, nil
	}

	kind := reflect.TypeOf(i).Kind()
	switch kind {
	case reflect.Slice, reflect.Array:
		s := reflect.ValueOf(i)
		a := make([]time.Duration, s.Len())
		for j := 0; j < s.Len(); j++ {
			val, err := ToDurationE(s.Index(j).Interface())
			if err != nil {
				return []time.Duration{}, fmt.Errorf("unable to cast %#v of type %T to []time.Duration", i, i)
			}
			a[j] = val
		}
		return a, nil
	default:
		return []time.Duration{}, fmt.Errorf("unable to cast %#v of type %T to []time.Duration", i, i)
	}
}
814140
func safeSlice(keyvals []interface{}) []interface{} {
	if len(keyvals) == 0 {
		return nil
	}
	return keyvals[0:len(keyvals):len(keyvals)]
}
1323477
func alphabetSlice(from, to byte) (string, error) {
	leftPos := strings.Index(ASCII, string(from))
	rightPos := strings.LastIndex(ASCII, string(to))
	if leftPos > rightPos {
		return "", fmt.Errorf("invalid range specified: %s-%s", string(from), string(to))
	}
	return ASCII[leftPos:rightPos], nil
}
612957
func (e *Encoder) valueToTreeSlice(mtype reflect.Type, mval reflect.Value) ([]*Tree, error) {
	tval := make([]*Tree, mval.Len(), mval.Len())
	for i := 0; i < mval.Len(); i++ {
		val, err := e.valueToTree(mtype.Elem(), mval.Index(i))
		if err != nil {
			return nil, err
		}
		tval[i] = val
	}
	return tval, nil
}
1199074
func applySlice(dst reflect.Value, src reflect.Value) error {
	dst.Set(reflect.MakeSlice(dst.Type(), src.Len(), src.Len()))
	dstElemType := dst.Type().Elem()
	for i := 0; i < src.Len(); i++ {
		v, err := convert(src.Index(i), dstElemType)
		if err != nil {
			return fmt.Errorf("Invalid %dth value: %s", i, err)
		}
		dst.Index(i).Set(v)
	}
	return nil
}
1305399
func ToInterfaceSlice(slice interface{}) []interface{} {
	v := reflect.ValueOf(slice)
	is := make([]interface{}, 0)
	if v.Kind() == reflect.Slice {
		is = make([]interface{},0 ,v.Len())
		for i := 0; i < v.Len(); i++ {
			is = append(is, v.Index(i).Interface())
		}
	}
	return is
}
1335521
func Uint64Slice(val, sep string) ([]uint64, error) {
	s := strings.Split(val, sep)
	values := make([]uint64, len(s))
	for i, v := range s {
		value, err := Uint64(v)
		if err != nil {
			return values, err
		}
		values[i] = value
	}
	return values, nil
}
1079374
func (s Set) ToSlice() []string {
	ret := make([]string, 0, len(s))
	for k := range s {
		ret = append(ret, k)
	}
	return ret
}
487835
func makeErrorSlice(len int, e error) []error {
	errors := make([]error, len)
	for inx := 0; inx < len; inx = inx + 1 {
		errors[inx] = e
	}
	return errors
}
186701
func (r *RedisStore) AppendSlice(key string, values ...interface{}) error {
	return r.SetSlice(key, values)
}
794274
func IntSlice(src []int) []*int {
	dst := make([]*int, len(src))
	for i := 0; i < len(src); i++ {
		dst[i] = &(src[i])
	}
	return dst
}