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

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