Implement Stringer interface for DeviceState (#49)

* Implement `Stringer` interface for `DeviceState`

If device adoption fails the error message isn't very readable at the moment.

```
Error: unexpected state '10', wanted target '2'.
```

* Use `stringer`
This commit is contained in:
Joshua Spence
2021-09-24 13:55:12 +10:00
committed by GitHub
parent 124f349da4
commit ff2854e943
6 changed files with 72 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
)
//go:generate stringer -trimprefix DeviceState -type DeviceState
type DeviceState int
const (