github.com/aergoio/aergo@v1.3.1/p2p/p2pcommon/peerrole_string.go (about)

     1  // Code generated by "stringer -type=PeerRole"; DO NOT EDIT.
     2  
     3  package p2pcommon
     4  
     5  import "strconv"
     6  
     7  const _PeerRole_name = "UnknownRoleBlockProducerWatcher"
     8  
     9  var _PeerRole_index = [...]uint8{0, 11, 24, 31}
    10  
    11  func (i PeerRole) String() string {
    12  	if i >= PeerRole(len(_PeerRole_index)-1) {
    13  		return "PeerRole(" + strconv.FormatInt(int64(i), 10) + ")"
    14  	}
    15  	return _PeerRole_name[_PeerRole_index[i]:_PeerRole_index[i+1]]
    16  }