github.com/osrg/gobgp/v3@v3.30.0/pkg/zebra/lsptype_string.go (about)

     1  // Code generated by "stringer -type=lspTYPE"; DO NOT EDIT.
     2  
     3  package zebra
     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[lspNone-0]
    12  	_ = x[lspStatic-1]
    13  	_ = x[lspLDP-2]
    14  	_ = x[lspBGP-3]
    15  	_ = x[lspSR-4]
    16  	_ = x[lspSHARP-5]
    17  }
    18  
    19  const _lspTYPE_name = "lspNonelspStaticlspLDPlspBGPlspSRlspSHARP"
    20  
    21  var _lspTYPE_index = [...]uint8{0, 7, 16, 22, 28, 33, 41}
    22  
    23  func (i lspTYPE) String() string {
    24  	if i >= lspTYPE(len(_lspTYPE_index)-1) {
    25  		return "lspTYPE(" + strconv.FormatInt(int64(i), 10) + ")"
    26  	}
    27  	return _lspTYPE_name[_lspTYPE_index[i]:_lspTYPE_index[i+1]]
    28  }