github.com/aquanetwork/aquachain@v1.7.8/p2p/discv5/nodeevent_string.go (about) 1 // Code generated by "stringer -type=nodeEvent"; DO NOT EDIT. 2 3 package discv5 4 5 import "strconv" 6 7 const ( 8 _nodeEvent_name_0 = "pingPacketpongPacketfindnodePacketneighborsPacketfindnodeHashPackettopicRegisterPackettopicQueryPackettopicNodesPacket" 9 _nodeEvent_name_1 = "pongTimeoutpingTimeoutneighboursTimeout" 10 ) 11 12 var ( 13 _nodeEvent_index_0 = [...]uint8{0, 10, 20, 34, 49, 67, 86, 102, 118} 14 _nodeEvent_index_1 = [...]uint8{0, 11, 22, 39} 15 ) 16 17 func (i nodeEvent) String() string { 18 switch { 19 case 1 <= i && i <= 8: 20 i -= 1 21 return _nodeEvent_name_0[_nodeEvent_index_0[i]:_nodeEvent_index_0[i+1]] 22 case 265 <= i && i <= 267: 23 i -= 265 24 return _nodeEvent_name_1[_nodeEvent_index_1[i]:_nodeEvent_index_1[i+1]] 25 default: 26 return "nodeEvent(" + strconv.FormatInt(int64(i), 10) + ")" 27 } 28 }