github.com/linapex/ethereum-dpos-chinese@v0.0.0-20190316121959-b78b3a4a1ece/p2p/discv5/nodeevent_string.go (about) 1 2 //<developer> 3 // <name>linapex 曹一峰</name> 4 // <email>linapex@163.com</email> 5 // <wx>superexc</wx> 6 // <qqgroup>128148617</qqgroup> 7 // <url>https://jsq.ink</url> 8 // <role>pku engineer</role> 9 // <date>2019-03-16 12:09:43</date> 10 //</624342657077874688> 11 12 //由“stringer-type=nodeEvent”生成的代码;不要编辑。 13 14 package discv5 15 16 import "strconv" 17 18 const _nodeEvent_name = "pongTimeoutpingTimeoutneighboursTimeout" 19 20 var _nodeEvent_index = [...]uint8{0, 11, 22, 39} 21 22 func (i nodeEvent) String() string { 23 i -= 264 24 if i >= nodeEvent(len(_nodeEvent_index)-1) { 25 return "nodeEvent(" + strconv.FormatInt(int64(i+264), 10) + ")" 26 } 27 return _nodeEvent_name[_nodeEvent_index[i]:_nodeEvent_index[i+1]] 28 } 29