github.com/sagernet/wireguard-go@v0.0.0-20231215174105-89dec3b2f3e8/device/devicestate_string.go (about)

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