// Add a key to the header
187847
func (h *RevelHeader) Add(key, value string) {
	if h.Server != nil {
		h.Server.Add(key, value)
	}
}
625703
func (r *readerOffsets) AddKey(offset uint32, key []byte) {
	r.offsets = append(r.offsets, offset)
	pre := keyPrefix(key)
	if r.entry.pre != pre && r.entry.total != 0 {
		r.prefixes = append(r.prefixes, r.entry)
	}
	r.entry.pre = pre
	r.entry.total++
}
501408
func (h *headerIndex) addHeaders(batch headerBatch) error {
	// If we're writing a 0-length batch, make no changes and return.
	if len(batch) == 0 {
		return nil
	}

	// In order to ensure optimal write performance, we'll ensure that the
	// items are sorted by their hash before insertion into the database.
	sort.Sort(batch)

	return walletdb.Update(h.db, func(tx walletdb.ReadWriteTx) error {
		rootBucket := tx.ReadWriteBucket(indexBucket)

		var tipKey []byte

		// Based on the specified index type of this instance of the
		// index, we'll grab the key that tracks the tip of the chain
		// so we can update the index once all the header entries have
		// been updated.
		// TODO(roasbeef): only need block tip?
		switch h.indexType {
		case Block:
			tipKey = bitcoinTip
		case RegularFilter:
			tipKey = regFilterTip
		default:
			return fmt.Errorf("unknown index type: %v", h.indexType)
		}

		var (
			chainTipHash   chainhash.Hash
			chainTipHeight uint32
		)

		for _, header := range batch {
			var heightBytes [4]byte
			binary.BigEndian.PutUint32(heightBytes[:], header.height)
			err := rootBucket.Put(header.hash[:], heightBytes[:])
			if err != nil {
				return err
			}

			// TODO(roasbeef): need to remedy if side-chain
			// tracking added
			if header.height >= chainTipHeight {
				chainTipHash = header.hash
				chainTipHeight = header.height
			}
		}

		return rootBucket.Put(tipKey, chainTipHash[:])
	})
}
582902
func (h Headers) Add(k, v string) Headers {
	r := append(h, k, v)
	return r
}
327891
func (c *BotsDimensionsCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
1149515
func (c *context) AddKey(key string, values map[string]string) {
	c.signal = OK
	c.values[key] = values

}
549140
func (c *UIConfig) HeaderKeys(ctx context.Context) ([]string, error) {
	c.l.RLock()
	defer c.l.RUnlock()

	config, err := c.get(ctx)
	if err != nil {
		return nil, err
	}
	if config == nil {
		return nil, nil
	}
	var keys []string
	for k := range config.Headers {
		keys = append(keys, k)
	}
	return keys, nil
}
203188
func (c *AppPackageInsertCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
121870
func (d *Decoder) Header() []string {
	header := make([]string, len(d.header))
	copy(header, d.header)
	return header
}
782514
func (t *Table) AddHeaders(headers ...interface{}) {
	t.headers = append(t.headers, headers...)
}
295343
func (c *Context) SetHeader(key, value string) {
	c.response.Header().Set(key, value)
}
202386
func AddHeaders(headers map[string]string) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		h := w.Header()

		for name, value := range headers {
			h.Add(name, value)
		}
	}
}
1250566
func (msg *MsgCFCheckpt) AddCFHeader(header *chainhash.Hash) error {
	if len(msg.FilterHeaders) == cap(msg.FilterHeaders) {
		str := fmt.Sprintf("FilterHeaders has insufficient capacity for "+
			"additional header: len = %d", len(msg.FilterHeaders))
		return messageError("MsgCFCheckpt.AddCFHeader", str)
	}

	msg.FilterHeaders = append(msg.FilterHeaders, header)
	return nil
}
1027739
func (m *Message) AddHeader(header, value string) {
	if m.headers == nil {
		m.headers = make(map[string]string)
	}
	m.headers[header] = value
}
391198
func (r *Response) AddHeader(key, value string) *Response {
	r.Header.Add(key, value)
	return r
}
1148907
func (c *AddMachinesCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
98168
func (h Headers) AddHeaders(o Headers) Headers {
	r := append(h, o...)
	return r
}