github.com/decred/dcrlnd@v0.7.6/lnwire/dcrlnd_util.go (about)

     1  package lnwire
     2  
     3  import "strings"
     4  
     5  // MessagesTypesLogger logs the list of messages as a string if needed.
     6  type MessagesTypesLogger []Message
     7  
     8  // MessageTypesToString returns a string that describes every message type in
     9  // the slice, separated by a comma.
    10  func (msgs MessagesTypesLogger) String() string {
    11  	typs := make([]string, len(msgs))
    12  	for i := range msgs {
    13  		typs[i] = msgs[i].MsgType().String()
    14  	}
    15  	return strings.Join(typs, ",")
    16  }