joshuar-go-hass-agent/internal/linux/batteryLevelsStrings.go

30 lines
858 B
Go

// Code generated by "stringer -type=batteryLevel -output batteryLevelsStrings.go -linecomment"; DO NOT EDIT.
package linux
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[batteryLevelNone-1]
_ = x[batteryLevelLow-2]
_ = x[batteryLevelCrit-3]
_ = x[batteryLevelNorm-4]
_ = x[batteryLevelHigh-5]
_ = x[batteryLevelFull-6]
}
const _batteryLevel_name = "NoneLowCriticalNormalHighFull"
var _batteryLevel_index = [...]uint8{0, 4, 7, 15, 21, 25, 29}
func (i batteryLevel) String() string {
i -= 1
if i >= batteryLevel(len(_batteryLevel_index)-1) {
return "batteryLevel(" + strconv.FormatInt(int64(i+1), 10) + ")"
}
return _batteryLevel_name[_batteryLevel_index[i]:_batteryLevel_index[i+1]]
}