github.com/humaniq/go-ethereum@v1.6.8-0.20171225131628-061223a13848/p2p/discv5/nodeevent_string.go (about) 1 // Code generated by "stringer -type nodeEvent"; DO NOT EDIT 2 3 package discv5 4 5 import "fmt" 6 7 const ( 8 _nodeEvent_name_0 = "invalidEventpingPacketpongPacketfindnodePacketneighborsPacketfindnodeHashPackettopicRegisterPackettopicQueryPackettopicNodesPacket" 9 _nodeEvent_name_1 = "pongTimeoutpingTimeoutneighboursTimeout" 10 ) 11 12 var ( 13 _nodeEvent_index_0 = [...]uint8{0, 12, 22, 32, 46, 61, 79, 98, 114, 130} 14 _nodeEvent_index_1 = [...]uint8{0, 11, 22, 39} 15 ) 16 17 func (i nodeEvent) String() string { 18 switch { 19 case 0 <= i && i <= 8: 20 return _nodeEvent_name_0[_nodeEvent_index_0[i]:_nodeEvent_index_0[i+1]] 21 case 265 <= i && i <= 267: 22 i -= 265 23 return _nodeEvent_name_1[_nodeEvent_index_1[i]:_nodeEvent_index_1[i+1]] 24 default: 25 return fmt.Sprintf("nodeEvent(%d)", i) 26 } 27 }