21 lines
298 B
Go
21 lines
298 B
Go
package api
|
|
|
|
type Feature int
|
|
|
|
func (f *Feature) UnmarshalText(text []byte) error {
|
|
feat, err := FeatureString(string(text))
|
|
if err == nil {
|
|
*f = feat
|
|
}
|
|
return err
|
|
}
|
|
|
|
//go:generate enumer -type Feature
|
|
const (
|
|
_ Feature = iota
|
|
Offline
|
|
CoarseCurrent
|
|
IntegratedDevice
|
|
Heating
|
|
Retryable
|
|
)
|