// Copy mocks base method
507994
func (m *MockDatabase) Copy() (state.Database, state.SessionCloser) {
	ret := m.ctrl.Call(m, "Copy")
	ret0, _ := ret[0].(state.Database)
	ret1, _ := ret[1].(state.SessionCloser)
	return ret0, ret1
}
1214935
func (h *HTLC) Copy() HTLC {
	clone := HTLC{
		Incoming:      h.Incoming,
		Amt:           h.Amt,
		RefundTimeout: h.RefundTimeout,
		OutputIndex:   h.OutputIndex,
	}
	copy(clone.Signature[:], h.Signature)
	copy(clone.RHash[:], h.RHash[:])

	return clone
}
954666
func (ib *inputBuffer) copy(d []byte) int {
	// TODO: check all call sites, maybe this can be made more efficient
	return copy(ib.data, d)
}
1183075
func (p *Prefix) Copy() *Prefix {
	if p == nil {
		return nil
	}

	newPrefix := &Prefix{}

	*newPrefix = *p

	return newPrefix
}
153045
func (v DynamicValue) Copy() DynamicValue {
	if v == nil {
		return nil
	}

	ret := make(DynamicValue, len(v))
	copy(ret, v)
	return ret
}
1204959
func (oc *ObjectComprehension) Copy() *ObjectComprehension {
	cpy := *oc
	cpy.Body = oc.Body.Copy()
	cpy.Key = oc.Key.Copy()
	cpy.Value = oc.Value.Copy()
	return &cpy
}
914325
func (m *MockContainerAPIClient) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) {
	ret := m.ctrl.Call(m, "CopyFromContainer", ctx, container, srcPath)
	ret0, _ := ret[0].(io.ReadCloser)
	ret1, _ := ret[1].(types.ContainerPathStat)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}
1216680
func (c Collector) Copy(m map[string]interface{}) {
	for v, k := range m {
		c.Set(v, k)
	}
}
564176
func (_m *State) Copy() state.State {
	ret := _m.Called()

	var r0 state.State
	if rf, ok := ret.Get(0).(func() state.State); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(state.State)
		}
	}

	return r0
}
81454
func (a Args) Copy() Args {
	cpy := Args{}
	for _, t := range a {
		cpy = append(cpy, t.Copy())
	}
	return cpy
}
967156
func Copy(ctx context.Context, src io.Reader, dst io.Writer) (int64, error) {
	return io.Copy(dst, NewReader(ctx, src))
}
1045627
func (c *Calcium) Copy(ctx context.Context, opts *types.CopyOptions) (chan *types.CopyMessage, error) {
	ch := make(chan *types.CopyMessage)
	go func() {
		defer close(ch)
		wg := sync.WaitGroup{}
		log.Infof("[Copy] Copy %d containers files", len(opts.Targets))
		// container one by one
		for cid, paths := range opts.Targets {
			wg.Add(1)
			go func(cid string, paths []string) {
				defer wg.Done()
				container, err := c.GetContainer(ctx, cid)
				if err != nil {
					log.Errorf("[Copy] Error when get container %s, err %v", cid, err)
					ch <- makeCopyMessage(cid, cluster.CopyFailed, "", "", err, nil)
					return
				}
				for _, path := range paths {
					wg.Add(1)
					go func(path string) {
						defer wg.Done()
						resp, name, err := container.Engine.VirtualizationCopyFrom(ctx, container.ID, path)
						if err != nil {
							log.Errorf("[Copy] Error during CopyFromContainer: %v", err)
							ch <- makeCopyMessage(cid, cluster.CopyFailed, "", path, err, nil)
							return
						}
						ch <- makeCopyMessage(cid, cluster.CopyOK, name, path, nil, resp)
					}(path)
				}
			}(cid, paths)
		}
		wg.Wait()
	}()
	return ch, nil
}
326521
func (d *EphemeralDisk) Copy() *EphemeralDisk {
	ld := new(EphemeralDisk)
	*ld = *d
	return ld
}
40181
func (imp *Import) Copy() *Import {
	cpy := *imp
	cpy.Path = imp.Path.Copy()
	return &cpy
}
977019
func (originalParams Params) Copy() Params {
	if originalParams == nil {
		return nil
	}

	params := Params{}
	for key, value := range originalParams {
		params[key] = value
	}

	return params
}
814076
func (br *ResponseBuffer) Copy(w http.ResponseWriter) error {
	for k, v := range br.sent {
		w.Header()[k] = v
	}
	w.WriteHeader(br.code)
	_, err := io.Copy(w, br)
	return err
}
184258
func (c Config) Copy() (m Map) {
	m = make(Map)
	for k, v := range c.root {
		m[k] = v
	}
	return
}