// DropReason prints the drop reason in a human readable string
329840
func DropReason(reason uint8) string {
	if err, ok := errors[reason]; ok {
		return err
	}
	return fmt.Sprintf("%d", reason)
}
183707
func dropCR(data []byte) []byte {
	if len(data) > 0 && data[len(data)-1] == '\r' {
		return data[0 : len(data)-1]
	}
	return data
}
288709
func (s *TerminateWorkflowExecutionInput) SetReason(v string) *TerminateWorkflowExecutionInput {
	s.Reason = &v
	return s
}
759065
func (s *DisableStageTransitionInput) SetReason(v string) *DisableStageTransitionInput {
	s.Reason = &v
	return s
}
1093428
func (m *MonitorFormatter) dropEvents(prefix string, data []byte) {
	dn := monitor.DropNotify{}

	if err := binary.Read(bytes.NewReader(data), byteorder.Native, &dn); err != nil {
		fmt.Printf("Error while parsing drop notification message: %s\n", err)
	}
	if m.match(monitorAPI.MessageTypeDrop, dn.Source, uint16(dn.DstID)) {
		switch m.Verbosity {
		case INFO:
			dn.DumpInfo(data)
		case JSON:
			dn.DumpJSON(data, prefix)
		default:
			fmt.Println(msgSeparator)
			dn.DumpVerbose(!m.Hex, data, prefix)
		}
	}
}
927207
func (o *Droplet) UnmarshalJSON(data []byte) error {
	var jsonName string
	if err := json.Unmarshal(data, &jsonName); err == nil {
		o.Name = &jsonName
		return nil
	}

	var r realDroplet
	if err := json.Unmarshal(data, &r); err != nil {
		return err
	}
	*o = Droplet(r)
	return nil
}
1310535
func (c *Call) dropPrereqs() (preReqs []*Call) {
	preReqs = c.preReqs
	c.preReqs = nil
	return
}
128245
func (r Rope) DropPrefix(start int64) Rope {
	if start <= 0 || r.node == nil {
		return r
	}
	return Rope{
		node: r.node.dropPrefix(start),
	}
}
593082
func (conn *SocksConn) RejectReason(reason byte) error {
	if conn.socksVersion == socks4Version {
		return sendSocks4aResponseRejected(conn)
	}
	return sendSocks5ResponseRejected(conn, reason)
}
40811
func (b *SqliteBuilder) DropColumn(table, col string) *Query {
	q := b.NewQuery("")
	q.LastError = errors.New("SQLite does not support dropping columns")
	return q
}
582864
func (s *SubmitContainerStateChangeInput) SetReason(v string) *SubmitContainerStateChangeInput {
	s.Reason = &v
	return s
}
612852
func (s *TargetHealth) SetReason(v string) *TargetHealth {
	s.Reason = &v
	return s
}
164972
func (c *Conn) ReadJSON(v interface{}) error {
	_, r, err := c.NextReader()
	if err != nil {
		return err
	}
	err = json.NewDecoder(r).Decode(v)
	if err == io.EOF {
		// One value is expected in the message.
		err = io.ErrUnexpectedEOF
	}
	return err
}
349202
func (r RejectionReason) String() string {
	switch r {
	case Prohibited:
		return "administratively prohibited"
	case ConnectionFailed:
		return "connect failed"
	case UnknownChannelType:
		return "unknown channel type"
	case ResourceShortage:
		return "resource shortage"
	}
	return fmt.Sprintf("unknown reason %d", int(r))
}
1001108
func GetReason(ctx context.Context) string {
	sv, ok := ctx.Value(ctxKeyReason).(string)
	if !ok {
		return ""
	}
	return sv
}
1190497
func dropEmpty(list []*string) []string {
	var l []string
	for _, s := range list {
		if *s != "" {
			l = append(l, *s)
		}
	}
	return l
}
356317
func (s *CancelJobInput) SetReason(v string) *CancelJobInput {
	s.Reason = &v
	return s
}