//SliceRemove SliceRomove(a,4,5) //a[4]
10335
func SliceRemove(slice []interface{}, start int, args ...int) []interface{} {
	var end int
	if len(args) == 0 {
		end = start + 1
	} else {
		end = args[0]
	}
	if end > len(slice)-1 {
		return slice[:start]
	}
	return append(slice[:start], slice[end:]...)
}
275403
func KeyRemove(keyID string) error {
	c, err := client.New()

	if err != nil {
		return err
	}

	fmt.Printf("Removing %s SSH Key...", keyID)

	if err = keys.Delete(c, keyID); err != nil {
		fmt.Println()
		return err
	}

	fmt.Println(" done")
	return nil
}
1209555
func (b *Bitmap) SliceRange(start, end uint64) []uint64 {
	var a []uint64
	itr := b.Iterator()
	itr.Seek(start)
	for v, eof := itr.Next(); !eof && v < end; v, eof = itr.Next() {
		a = append(a, v)
	}
	return a
}
667738
func SliceSetOne(s1 []byte, b uint) []byte {
	r := b / 8
	rs := b - r*8

	mb := byte(0x80)
	mb = mb >> rs

	s1[r] = s1[r] | mb

	return s1
}
701070
func RoleNameSliceRemove(ss []data.RoleName, s data.RoleName) []data.RoleName {
	res := []data.RoleName{}
	for _, v := range ss {
		if v != s {
			res = append(res, v)
		}
	}
	return res
}
593559
func (cli *Client) ImageRemove(ctx context.Context, imageID string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error) {
	query := url.Values{}

	if options.Force {
		query.Set("force", "1")
	}
	if !options.PruneChildren {
		query.Set("noprune", "1")
	}

	var dels []types.ImageDeleteResponseItem
	resp, err := cli.delete(ctx, "/images/"+imageID, query, nil)
	defer ensureReaderClosed(resp)
	if err != nil {
		return dels, wrapResponseError(err, resp, "image", imageID)
	}

	err = json.NewDecoder(resp.body).Decode(&dels)
	return dels, err
}
1038276
func (r *Reply) Slice(s interface{}) error {
	if r.Type() == ReplyNil {
		return ErrNil
	}
	if r.Type() != ReplyArray {
		return ErrType
	}
	if len(r.arrayValue) == 0 {
		return nil
	}
	switch s := s.(type) {
	case *[]int:
		*s = make([]int, len(r.arrayValue))
		for i := range r.arrayValue {
			x, err := r.arrayValue[i].Int()
			if err != nil && err != ErrNil {
				return err
			}
			(*s)[i] = int(x)
		}
		return nil
	case *[]int64:
		*s = make([]int64, len(r.arrayValue))
		for i := range r.arrayValue {
			x, err := r.arrayValue[i].Int()
			if err != nil && err != ErrNil {
				return err
			}
			(*s)[i] = x
		}
		return nil
	case *[]float64:
		*s = make([]float64, len(r.arrayValue))
		for i := range r.arrayValue {
			x, err := r.arrayValue[i].Float()
			if err != nil && err != ErrNil {
				return err
			}
			(*s)[i] = x
		}
		return nil
	case *[]bool:
		*s = make([]bool, len(r.arrayValue))
		for i := range r.arrayValue {
			x, err := r.arrayValue[i].Bool()
			if err != nil && err != ErrNil {
				return err
			}
			(*s)[i] = x
		}
		return nil
	case *[]string:
		*s = make([]string, len(r.arrayValue))
		for i := range r.arrayValue {
			x, err := r.arrayValue[i].String()
			if err != nil && err != ErrNil {
				return err
			}
			(*s)[i] = x
		}
		return nil
	case *[][]byte:
		*s = make([][]byte, len(r.arrayValue))
		for i := range r.arrayValue {
			x, err := r.arrayValue[i].Bytes()
			if err != nil && err != ErrNil {
				return err
			}
			(*s)[i] = x
		}
		return nil
	case *[]FixInt:
		*s = make([]FixInt, len(r.arrayValue))
		for i := range r.arrayValue {
			x, err := r.arrayValue[i].FixInt()
			if err != nil && err != ErrNil {
				return err
			}
			(*s)[i] = FixInt(x)
		}
		return nil
	case *[]VarInt:
		*s = make([]VarInt, len(r.arrayValue))
		for i := range r.arrayValue {
			x, err := r.arrayValue[i].VarInt()
			if err != nil && err != ErrNil {
				return err
			}
			(*s)[i] = VarInt(x)
		}
		return nil
	case *[]*Pair:
		if len(r.arrayValue)%2 != 0 {
			return ErrType
		}
		*s = make([]*Pair, len(r.arrayValue)/2)
		for i := 0; i < len(r.arrayValue)/2; i++ {
			first, err := r.arrayValue[2*i].Bytes()
			if err != nil && err != ErrNil {
				return err
			}
			second, err := r.arrayValue[2*i+1].Bytes()
			if err != nil && err != ErrNil {
				return err
			}
			(*s)[i] = &Pair{first, second}
		}
		return nil
	default:
		return ErrConvert
	}
	return nil
}
1275987
func Slice(slicePtr interface{}, less func(i, j int) bool) {
	v := reflect.ValueOf(slicePtr).Elem()
	if v.Len() <= 1 {
		return
	}
	sort.Slice(v.Interface(), less)

	i := 0
	for j := 1; j < v.Len(); j++ {
		if !less(i, j) {
			continue
		}
		i++
		v.Index(i).Set(v.Index(j))
	}
	i++
	v.SetLen(i)
}
263985
func (c *Connector) MultiRemove(ctx context.Context, ei *dosa.EntityInfo, multiValues []map[string]dosa.FieldValue) ([]error, error) {
	return makeErrorSlice(len(multiValues), &dosa.ErrNotFound{}), nil
}
61169
func sliceCompress(data []byte) []byte {
	var buf bytes.Buffer
	cmp, _ := zlib.NewWriterLevel(&buf, zlib.BestSpeed)
	cmp.Write(data)
	cmp.Close()
	return buf.Bytes()
}
309133
func (_m *API) ImageRemove(ctx context.Context, image string, force bool, prune bool) ([]string, error) {
	ret := _m.Called(ctx, image, force, prune)

	var r0 []string
	if rf, ok := ret.Get(0).(func(context.Context, string, bool, bool) []string); ok {
		r0 = rf(ctx, image, force, prune)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string, bool, bool) error); ok {
		r1 = rf(ctx, image, force, prune)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
431030
func (ix *Index) slice(off uint32, n int) []byte {
	o := int(off)
	if uint32(o) != off || n >= 0 && o+n > len(ix.data.d) {
		corrupt()
	}
	if n < 0 {
		return ix.data.d[o:]
	}
	return ix.data.d[o : o+n]
}
1256692
func MapRemoveByRankRangeCountOp(binName string, rank int, count int, returnType mapReturnType) *Operation {
	return newCDTCreateOperationIndexCount(_CDT_MAP_REMOVE_BY_RANK_RANGE, _MAP_MODIFY, binName, rank, count, returnType)
}
1057971
func (enc *Encoder) SliceIntKey(k string, s []int) {
	enc.ArrayKey(k, EncodeArrayFunc(func(enc *Encoder) {
		for _, i := range s {
			enc.Int(i)
		}
	}))
}
803729
func (k *SimpleFS) SimpleFSRemove(ctx context.Context,
	arg keybase1.SimpleFSRemoveArg) error {
	return k.startAsync(ctx, arg.OpID, keybase1.AsyncOps_REMOVE,
		keybase1.NewOpDescriptionWithRemove(
			keybase1.RemoveArgs{
				OpID: arg.OpID, Path: arg.Path, Recursive: arg.Recursive,
			}),
		func(ctx context.Context) (err error) {
			return k.doRemove(ctx, arg.Path, arg.Recursive)
		})
}
111428
func SliceSorter(slice interface{}, less func(i, j int) bool) Interface {
	return MakeInterface(reflect.ValueOf(slice).Len(), reflectutil.Swapper(slice), less)
}
280646
func ListRemoveByIndexRangeOp(binName string, index, returnType ListReturnType) *Operation {
	return &Operation{opType: _CDT_MODIFY, binName: binName, binValue: ListValue{_CDT_LIST_REMOVE_BY_INDEX_RANGE, IntegerValue(returnType), IntegerValue(index)}, encoder: listGenericOpEncoder}
}