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

7
tools.go Normal file
View File

@@ -0,0 +1,7 @@
// +build tools
package main
import (
_ "golang.org/x/tools/cmd/stringer"
)