// Message エラー発生時のメッセージ(
328966
func (e *apiError) Message() string {
	if e.origErr != nil {
		return e.origErr.ErrorMessage
	}
	return ""
}
725640
func (s *State) Message(channelID, messageID string) (*Message, error) {
	if s == nil {
		return nil, ErrNilState
	}

	c, err := s.Channel(channelID)
	if err != nil {
		return nil, err
	}

	s.RLock()
	defer s.RUnlock()

	for _, m := range c.Messages {
		if m.ID == messageID {
			return m, nil
		}
	}

	return nil, ErrStateNotFound
}
1108848
func NewMessage(id uint64, phstr string) *Message {
	return &Message{id, Parts(phstr)}
}
1160404
func (w *Window) message(format string, args ...interface{}) {
	if *acmeDebug {
		q0, q1, _ := w.ReadAddr()
		log.Printf("message; addr=%d,%d", q0, q1)
	}
	if err := w.Addr(".-/\\n?\\n?/"); err != nil && *acmeDebug {
		log.Printf("set addr: %s", err)
	}
	q0, _, _ := w.ReadAddr()
	nl := ""
	if q0 > 0 {
		nl = "\n"
	}
	if *acmeDebug {
		q0, q1, _ := w.ReadAddr()
		log.Printf("inserting; addr=%d,%d", q0, q1)
	}
	w.Fprintf("data", nl+w.time()+format+"\n", args...)
	if *acmeDebug {
		q0, q1, _ := w.ReadAddr()
		log.Printf("wrote; addr=%d,%d", q0, q1)
	}
}
191765
func (e *errInvalidParam) Message() string {
	return fmt.Sprintf("%s, %s.", e.msg, e.Field())
}
743057
func (event *Event) MessageType() (msgtype string, ok bool) {
	value, exists := event.Content["msgtype"]
	if !exists {
		return
	}
	msgtype, ok = value.(string)
	return
}
757410
func (cms *ConcurrentMergeScheduler) message(format string, args ...interface{}) {
	cms.writer.infoStream.Message("CMS", format, args...)
}
1314345
func NewMessageCopy(m Message) Message {
	m2 := NewMessage()
	m2.Copy(m)
	return m2
}
1297761
func (m *Messenger) SendGeneralMessage(to Recipient, elements *[]StructuredMessageElement, messagingType MessagingType, tags ...string) error {
	r := &Response{
		token: m.token,
		to:    to,
	}
	return r.GenericTemplate(elements, messagingType, tags...)
}
170291
func (msg *Message) Clone() *Message {
	clone := *msg

	clone.data.payload = make([]byte, len(msg.data.payload))
	copy(clone.data.payload, msg.data.payload)

	return &clone
}
853041
func Message(out Output, id, message string) {
	out.WriteProgress(Progress{ID: id, Message: message})
}
69803
func CreateMessage(c *messagebird.Client, conversationID string, req *MessageCreateRequest) (*Message, error) {
	uri := fmt.Sprintf("%s/%s/%s", path, conversationID, messagesPath)

	message := &Message{}
	if err := request(c, message, http.MethodPost, uri, req); err != nil {
		return nil, err
	}

	return message, nil
}
832871
func (r *Response) Message(msg string) JResponseWriter {
	return r.Field(fieldMsg, msg)
}
1059192
func (lm *logMatcher) FailureMessage(actual interface{}) (message string) {
	return fmt.Sprintf(
		"Expected\n\t%s\nto contain log sequence \n\t%s",
		format.Object(lm.actual, 0),
		format.Object(lm.expected, 0),
	)
}
531788
func UserMessage(e error) string {
	if e == nil {
		return ""
	}
	msg, _ := Value(e, userMessage).(string)
	return msg
}
1237463
func (vr *ValidationResult) Message(msg string) *ValidationResult {
	vr.message = msg
	return vr
}
419678
func (msg *Message) String() string {
	if err := msg.IsValid(); err != nil {
		return "<invalid>"
	}
	s := msg.Type.String()
	if v, ok := msg.Headers[FieldSender]; ok {
		s += " from " + v.value.(string)
	}
	if v, ok := msg.Headers[FieldDestination]; ok {
		s += " to " + v.value.(string)
	}
	s += " serial " + strconv.FormatUint(uint64(msg.serial), 10)
	if v, ok := msg.Headers[FieldReplySerial]; ok {
		s += " reply_serial " + strconv.FormatUint(uint64(v.value.(uint32)), 10)
	}
	if v, ok := msg.Headers[FieldUnixFDs]; ok {
		s += " unixfds " + strconv.FormatUint(uint64(v.value.(uint32)), 10)
	}
	if v, ok := msg.Headers[FieldPath]; ok {
		s += " path " + string(v.value.(ObjectPath))
	}
	if v, ok := msg.Headers[FieldInterface]; ok {
		s += " interface " + v.value.(string)
	}
	if v, ok := msg.Headers[FieldErrorName]; ok {
		s += " error " + v.value.(string)
	}
	if v, ok := msg.Headers[FieldMember]; ok {
		s += " member " + v.value.(string)
	}
	if len(msg.Body) != 0 {
		s += "\n"
	}
	for i, v := range msg.Body {
		s += "  " + MakeVariant(v).String()
		if i != len(msg.Body)-1 {
			s += "\n"
		}
	}
	return s
}