github.com/core-coin/go-core/v2@v2.1.9/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  func _() {
     8  	// An "invalid array index" compiler error signifies that the constant values have changed.
     9  	// Re-run the stringer command to generate them again.
    10  	var x [1]struct{}
    11  	_ = x[pongTimeout-264]
    12  	_ = x[pingTimeout-265]
    13  	_ = x[neighboursTimeout-266]
    14  }
    15  
    16  const _nodeEvent_name = "pongTimeoutpingTimeoutneighboursTimeout"
    17  
    18  var _nodeEvent_index = [...]uint8{0, 11, 22, 39}
    19  
    20  func (i nodeEvent) String() string {
    21  	i -= 264
    22  	if i >= nodeEvent(len(_nodeEvent_index)-1) {
    23  		return "nodeEvent(" + strconv.FormatInt(int64(i+264), 10) + ")"
    24  	}
    25  	return _nodeEvent_name[_nodeEvent_index[i]:_nodeEvent_index[i+1]]
    26  }