code: func (m *SignedGossipMessage) String() string {
  	env := "No envelope"
  	if m.Envelope != nil {
  		var secretEnv string
  		if m.SecretEnvelope != nil {
  			pl := len(m.SecretEnvelope.Payload)
  			sl := len(m.SecretEnvelope.Signature)
  			secretEnv = fmt.Sprintf(" Secret payload: %d bytes, Secret Signature: %d bytes", pl, sl)
  		}
  		env = fmt.Sprintf("%d bytes, Signature: %d bytes%s", len(m.Envelope.Payload), len(m.Envelope.Signature), secretEnv)
  	}
  	gMsg := "No gossipMessage"
  	if m.GossipMessage != nil {
  		var isSimpleMsg bool
  		if m.GetStateResponse() != nil {
  			gMsg = fmt.Sprintf("StateResponse with %d items", len(m.GetStateResponse().Payloads))
  		} else if m.IsDataMsg() && m.GetDataMsg().Payload != nil {
  			gMsg = m.GetDataMsg().Payload.toString()
  		} else if m.IsDataUpdate() {
  			update := m.GetDataUpdate()
  			gMsg = fmt.Sprintf("DataUpdate: %s", update.toString())
  		} else if m.GetMemRes() != nil {
  			gMsg = m.GetMemRes().toString()
  		} else if m.IsStateInfoSnapshot() {
  			gMsg = m.GetStateSnapshot().toString()
  		} else if m.GetPrivateRes() != nil {
  			gMsg = m.GetPrivateRes().ToString()
  		} else {
  			gMsg = m.GossipMessage.String()
  			isSimpleMsg = true
  		}
  		if !isSimpleMsg {
  			desc := fmt.Sprintf("Channel: %s, nonce: %d, tag: %s", string(m.Channel), m.Nonce, GossipMessage_Tag_name[int32(m.Tag)])
  			gMsg = fmt.Sprintf("%s %s", desc, gMsg)
  		}
  	}
  	return fmt.Sprintf("GossipMessage: %v, Envelope: %s", gMsg, env)
  }
docs: // String returns a string representation
  // of a SignedGossipMessage