github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/pkg/model/v1beta1/network_string.go (about)

     1  // Code generated by "stringer -type=Network --trimprefix=Network"; DO NOT EDIT.
     2  
     3  package v1beta1
     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[NetworkNone-0]
    12  	_ = x[NetworkFull-1]
    13  	_ = x[NetworkHTTP-2]
    14  }
    15  
    16  const _Network_name = "NoneFullHTTP"
    17  
    18  var _Network_index = [...]uint8{0, 4, 8, 12}
    19  
    20  func (i Network) String() string {
    21  	if i < 0 || i >= Network(len(_Network_index)-1) {
    22  		return "Network(" + strconv.FormatInt(int64(i), 10) + ")"
    23  	}
    24  	return _Network_name[_Network_index[i]:_Network_index[i+1]]
    25  }