build: enable goimports and varcheck linters (#16446)
This commit is contained in:
committed by
Felix Lange
parent
7605e63cb9
commit
ba1030b6b8
@ -4,24 +4,14 @@ package discv5
|
||||
|
||||
import "strconv"
|
||||
|
||||
const (
|
||||
_nodeEvent_name_0 = "invalidEventpingPacketpongPacketfindnodePacketneighborsPacketfindnodeHashPackettopicRegisterPackettopicQueryPackettopicNodesPacket"
|
||||
_nodeEvent_name_1 = "pongTimeoutpingTimeoutneighboursTimeout"
|
||||
)
|
||||
const _nodeEvent_name = "pongTimeoutpingTimeoutneighboursTimeout"
|
||||
|
||||
var (
|
||||
_nodeEvent_index_0 = [...]uint8{0, 12, 22, 32, 46, 61, 79, 98, 114, 130}
|
||||
_nodeEvent_index_1 = [...]uint8{0, 11, 22, 39}
|
||||
)
|
||||
var _nodeEvent_index = [...]uint8{0, 11, 22, 39}
|
||||
|
||||
func (i nodeEvent) String() string {
|
||||
switch {
|
||||
case 0 <= i && i <= 8:
|
||||
return _nodeEvent_name_0[_nodeEvent_index_0[i]:_nodeEvent_index_0[i+1]]
|
||||
case 265 <= i && i <= 267:
|
||||
i -= 265
|
||||
return _nodeEvent_name_1[_nodeEvent_index_1[i]:_nodeEvent_index_1[i+1]]
|
||||
default:
|
||||
return "nodeEvent(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||
i -= 264
|
||||
if i >= nodeEvent(len(_nodeEvent_index)-1) {
|
||||
return "nodeEvent(" + strconv.FormatInt(int64(i+264), 10) + ")"
|
||||
}
|
||||
return _nodeEvent_name[_nodeEvent_index[i]:_nodeEvent_index[i+1]]
|
||||
}
|
||||
|
Reference in New Issue
Block a user