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

@@ -42,6 +42,8 @@ jobs:
- uses: "actions/setup-go@v2"
with:
go-version: "${{ env.GO_VERSION }}"
- run: "go get golang.org/x/tools/cmd/stringer"
- run: "go generate ./..."
- run: "git diff --compact-summary --exit-code"