// Flash returns the flashed value of this Field.
482056
func (f *Field) Flash() string {
	v, _ := f.viewArgs["flash"].(map[string]string)[f.Name]
	return v
}
457034
func (vr *ValidationResult) Field(field string) *ValidationResult {
	vr.field = field
	return vr
}
640133
func (s *Strobe) Pulse(message string) {
	s.lock.Lock()
	defer s.lock.Unlock()
	for l := range s.listeners {
		go s.send(l, message)
	}
}
873857
func (m *SnapshotPrepare) Field(fieldpath []string) (string, bool) {
	if len(fieldpath) == 0 {
		return "", false
	}

	switch fieldpath[0] {
	case "key":
		return string(m.Key), len(m.Key) > 0
	case "parent":
		return string(m.Parent), len(m.Parent) > 0
	}
	return "", false
}
951262
func (e *Event) Hex(key string, val []byte) *Event {
	if e == nil {
		return e
	}
	e.buf = enc.AppendHex(enc.AppendKey(e.buf, key), val)
	return e
}
203878
func (sh *SlackrusHook) Fire(e *logrus.Entry) error {
	if sh.Disabled {
		return nil
	}
	
	color := ""
	switch e.Level {
	case logrus.DebugLevel:
		color = "#9B30FF"
	case logrus.InfoLevel:
		color = "good"
	case logrus.ErrorLevel, logrus.FatalLevel, logrus.PanicLevel:
		color = "danger"
	default:
		color = "warning"
	}

	msg := &slack.Message{
		Username:  sh.Username,
		Channel:   sh.Channel,
		IconEmoji: sh.IconEmoji,
		IconUrl:   sh.IconURL,
	}

	attach := msg.NewAttachment()

	newEntry := sh.newEntry(e)
	// If there are fields we need to render them at attachments
	if len(newEntry.Data) > 0 {

		// Add a header above field data
		attach.Text = "Message fields"

		for k, v := range newEntry.Data {
			slackField := &slack.Field{}

			slackField.Title = k
			slackField.Value = fmt.Sprint(v)
			// If the field is <= 20 then we'll set it to short
			if len(slackField.Value) <= 20 {
				slackField.Short = true
			}

			attach.AddField(slackField)
		}
		attach.Pretext = newEntry.Message
	} else {
		attach.Text = newEntry.Message
	}
	attach.Fallback = newEntry.Message
	attach.Color = color

	c := slack.NewClient(sh.HookURL)

	if sh.Asynchronous {
		go c.SendMessage(msg)
		return nil
	}

	return c.SendMessage(msg)
}
526133
func (buf *LogBuffer) Fire(entry *log.Entry) error {
	msg, err := entry.Logger.Formatter.Format(entry)
	if err != nil {
		return err
	}
	buf.PushMessage(string(msg))
	return nil
}
1133161
func (f *Flash) GetFloat32(key string) float32 {
	r, _ := f.Get(key).(float32)
	return r
}
73571
func (f *Field) Field(name string) *Field {
	field, ok := f.FieldOk(name)
	if !ok {
		panic("field not found")
	}

	return field
}
377950
func (c *Client) Dump(key string) (string, error) {
	v, err := c.execWithKey(true, "DUMP", key)
	if err != nil {
		return "", err
	}
	return iface2str(v)
}
1115364
func (document Document) Field(field string) interface{} {
	r, _ := document.Fields[field]
	return r
}
842306
func AddFlashObj(overseer Overseer, w http.ResponseWriter, r *http.Request, key string, value interface{}) error {
	mv, err := json.Marshal(value)
	if err != nil {
		return errors.Wrap(err, "unable to marshal flash value")
	}

	return AddFlash(overseer, w, r, key, string(mv))
}
723628
func (h Hook) Fire(e *logrus.Entry) error {
	dataBytes, err := h.formatter.Format(e)
	if err != nil {
		return err
	}
	_, err = h.writer.Write(dataBytes)
	return err
}
14762
func (f *Flash) GetString(key string) string {
	r, _ := f.Get(key).(string)
	return r
}
140563
func (f *fieldVal) Add(val *fieldVal) *fieldVal {
	// Since the field representation intentionally provides overflow bits,
	// it's ok to use carryless addition as the carry bit is safely part of
	// each word and will be normalized out.  This could obviously be done
	// in a loop, but the unrolled version is faster.
	f.n[0] += val.n[0]
	f.n[1] += val.n[1]
	f.n[2] += val.n[2]
	f.n[3] += val.n[3]
	f.n[4] += val.n[4]
	f.n[5] += val.n[5]
	f.n[6] += val.n[6]
	f.n[7] += val.n[7]
	f.n[8] += val.n[8]
	f.n[9] += val.n[9]

	return f
}
709588
func (a *CompositeAggregationTermsValuesSource) Field(field string) *CompositeAggregationTermsValuesSource {
	a.field = field
	return a
}
1288402
func (z *Lexer) Peek(pos int) byte {
	pos += z.pos
	return z.buf[pos]
}