// Append appends the provided error if it is not nil.
429702
func (errs *MultiError) Append(err error) {
	if err != nil {
		*errs = append(*errs, err)
	}
}
830113
func (errs Errors) Add(newErrors ...error) Errors {
	for _, err := range newErrors {
		if err == nil {
			continue
		}

		if errors, ok := err.(Errors); ok {
			errs = errs.Add(errors...)
		} else {
			ok = true
			for _, e := range errs {
				if err == e {
					ok = false
				}
			}
			if ok {
				errs = append(errs, err)
			}
		}
	}
	return errs
}
635047
func (r *Routes) Append(routes ...*Routes) Routes {
	res := Routes{}
	// copy current route
	for _, route := range *r {
		res = append(res, route)
	}
	for _, _routes := range routes {
		for _, route := range *_routes {
			res = append(res, route)
		}
	}
	return res
}
793715
func appendError(errors []error, err error) []error {
	if err != nil {
		return append(errors, err)
	}
	return errors
}
662759
func (jl *jsonLedger) Append(block *cb.Block) error {
	if block.Header.Number != jl.height {
		return errors.Errorf("block number should have been %d but was %d", jl.height, block.Header.Number)
	}

	if !bytes.Equal(block.Header.PreviousHash, jl.lastHash) {
		return errors.Errorf("block should have had previous hash of %x but was %x", jl.lastHash, block.Header.PreviousHash)
	}

	jl.writeBlock(block)
	jl.lastHash = block.Header.Hash()
	jl.height++

	// Manage the signal channel under lock to avoid race with read in Next
	jl.mutex.Lock()
	close(jl.signal)
	jl.signal = make(chan struct{})
	jl.mutex.Unlock()
	return nil
}
132707
func (e Error) Append(format string, a ...interface{}) Error {
	// if new line is false then append this error but first
	// we need to add a new line to the first, if it was true then it has the newline already.
	if e.Message != "" {
		e.Message += "\n"
	}

	return e.AppendInline(format, a...)
}
473118
func (fc *FeatureCollection) Append(feature *Feature) *FeatureCollection {
	fc.Features = append(fc.Features, feature)
	return fc
}
1169162
func (b *Bucket) Append(k string, data []byte) error {
	return b.Write(k, 0, 0, data, Append|Raw)
}
1343264
func (e *Enodes) Append(enode *Enode) {
	e.nodes = append(e.nodes, enode.node)
}
775312
func (s SenderAppender) Append(log *Log) error {
	s.Send(log.msg)

	return nil
}
1048243
func (cAppender *consoleAppender) Append(event *Event) (ok bool) {
	ok = false
	defer gorivets.EndQuietly()
	msg := ToLogMessage(event, cAppender.layoutTemplate)
	if cAppender.async {
		caFactory.msgChannel <- msg
	} else {
		caFactory.write(msg)
	}
	ok = caFactory.msgChannel != nil
	return ok
}
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
}
884014
func (writer *sparseWriter) Append(k, idx uint32, rho uint8) {
	if writer.hasCurrVal {
		if idx == writer.currIdx {
			if rho > writer.currRho {
				writer.currRho = rho
				writer.currVal = k
			}
			return
		} else {
			writer.commit()
		}
	}

	writer.hasCurrVal = true
	writer.currVal = k
	writer.currIdx = idx
	writer.currRho = rho
}
839717
func (c *ShardedClient) Append(key string, value []byte) MutateResponse {
	return c.mutate(
		key,
		func(shardClient Client) MutateResponse {
			return shardClient.Append(key, value)
		})
}
76005
func (m *OutMessage) Append(src []byte) {
	p := m.GrowNoZero(len(src))
	if p == nil {
		panic(fmt.Sprintf("Can't grow %d bytes", len(src)))
	}

	sh := (*reflect.SliceHeader)(unsafe.Pointer(&src))
	memmove(p, unsafe.Pointer(sh.Data), uintptr(sh.Len))

	return
}
1200937
func (f *FinalizeList) Append(finalizeFunc FinalizeFunc) {
	if finalizeFunc != nil {
		f.finalizeFuncs = append(f.finalizeFuncs, finalizeFunc)
	}
}
282778
func (c *CommitLog) Append(p []byte) (offset int64, err error) {
	l := Log(p)
	if c.checkSplit() {
		if err := c.split(); err != nil {
			return offset, err
		}
	}
	offset = c.NewestOffset()
	l.PutOffset(offset)
	if _, err := c.activeSegment().Write(l); err != nil {
		return offset, err
	}
	return offset, nil
}