// Append appends an item to the COWList and returns the index for that item.
347544
func (c *COWList) Append(i interface{}) int {
	c.mu.Lock()
	defer c.mu.Unlock()
	list := c.v.Load().([]interface{})
	newLen := len(list) + 1
	newList := make([]interface{}, newLen)
	copy(newList, list)
	newList[newLen-1] = i
	c.v.Store(newList)
	return newLen - 1
}
473118
func (fc *FeatureCollection) Append(feature *Feature) *FeatureCollection {
	fc.Features = append(fc.Features, feature)
	return fc
}
1173782
func (c *CurlCommand) append(newSlice ...string) {
	c.slice = append(c.slice, newSlice...)
}
1067515
func (c *Client) Append(cmd string, args ...interface{}) {
	c.pending = append(c.pending, &request{cmd, args})
}
1030110
func (m *subMenu) Append(i *MenuItem) (err error) {
	if err = m.isActionable(); err != nil {
		return
	}
	if _, err = synchronousEvent(m.c, m, m.w, Event{Name: EventNameSubMenuCmdAppend, TargetID: m.id, MenuItem: i.toEvent()}, EventNameSubMenuEventAppended); err != nil {
		return
	}
	m.items = append(m.items, i)
	return
}
826679
func (c *Chain) Append(fn MiddlewareHandlerFunc) {
	c.middlewareHandlers = append(c.middlewareHandlers, fn)
}
429702
func (errs *MultiError) Append(err error) {
	if err != nil {
		*errs = append(*errs, err)
	}
}
682536
func (b *Writer) append(text []byte) {
	b.buf.Write(text)
	b.cell.size += len(text)
}
833542
func (h *Hooks) Append(other *Hooks) error {
	for _, hook := range *other {
		if h.Match(hook.ID) != nil {
			return fmt.Errorf("hook with ID %s is already defined", hook.ID)
		}

		*h = append(*h, hook)
	}

	return nil
}
200442
func (f Form) Append(out []byte, src ...byte) []byte {
	return f.doAppend(out, inputBytes(src), len(src))
}
401400
func (fl *FileLedger) Append(block *cb.Block) error {
	err := fl.blockStore.AddBlock(block)
	if err == nil {
		close(fl.signal)
		fl.signal = make(chan struct{})
	}
	return err
}
1252215
func (s *BytesWriter) Append(args ...interface{}) {
	s.args = append(s.args, args...)
}
1219803
func (dt *DbfTable) Append(spec interface{}) int {
	return dt.Write(dt.AddRecord(), spec)
}
905142
func Append(to interface{}, from ...interface{}) (interface{}, error) {
	tov, toIsNil := indirect(reflect.ValueOf(to))

	toIsNil = toIsNil || to == nil
	var tot reflect.Type

	if !toIsNil {
		if tov.Kind() != reflect.Slice {
			return nil, fmt.Errorf("expected a slice, got %T", to)
		}

		tot = tov.Type().Elem()
		toIsNil = tov.Len() == 0

		if len(from) == 1 {
			fromv := reflect.ValueOf(from[0])
			if fromv.Kind() == reflect.Slice {
				if toIsNil {
					// If we get nil []string, we just return the []string
					return from[0], nil
				}

				fromt := reflect.TypeOf(from[0]).Elem()

				// If we get []string []string, we append the from slice to to
				if tot == fromt {
					return reflect.AppendSlice(tov, fromv).Interface(), nil
				} else if !fromt.AssignableTo(tot) {
					// Fall back to a []interface{} slice.
					return appendToInterfaceSliceFromValues(tov, fromv)

				}
			}
		}
	}

	if toIsNil {
		return Slice(from...), nil
	}

	for _, f := range from {
		fv := reflect.ValueOf(f)
		if !fv.Type().AssignableTo(tot) {
			// Fall back to a []interface{} slice.
			return appendToInterfaceSlice(tov, from...)
		}
		tov = reflect.Append(tov, fv)
	}

	return tov.Interface(), nil
}
680674
func Append(err error, str string) error {
	return errors.New(fmt.Sprint(err) + str)
}
251348
func (ldr *AEBackupInformationListLoader) Append(v interface{}) error {
	if entity, ok := v.(*AEBackupInformation); ok {
		ldr.List = append(ldr.List, entity)
	} else {
		return fmt.Errorf("v is not *AEBackupInformation, actual: %#v", v)
	}

	return nil
}
833591
func (association *Association) Append(values ...interface{}) *Association {
	if association.Error != nil {
		return association
	}

	if relationship := association.field.Relationship; relationship.Kind == "has_one" {
		return association.Replace(values...)
	}
	return association.saveAssociations(values...)
}