From eaf664e4e9134ab7d5100d7284274a821122fbbc Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 9 Feb 2021 15:39:19 +0100 Subject: device: remove deviceStateNew It's never used and we won't have a use for it. Also, move to go-running stringer, for those without GOPATHs. Signed-off-by: Jason A. Donenfeld --- device/device.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'device/device.go') diff --git a/device/device.go b/device/device.go index 0417397..1641c3b 100644 --- a/device/device.go +++ b/device/device.go @@ -91,20 +91,18 @@ type Device struct { } // deviceState represents the state of a Device. -// There are four states: new, down, up, closed. -// However, state new should never be observable. +// There are three states: down, up, closed. // Transitions: // -// new -> down -----+ -// ↑↓ ↓ -// up -> closed +// down -----+ +// ↑↓ ↓ +// up -> closed // type deviceState uint32 -//go:generate stringer -type deviceState -trimprefix=deviceState +//go:generate go run golang.org/x/tools/cmd/stringer -type deviceState -trimprefix=deviceState const ( - deviceStateNew deviceState = iota - deviceStateDown + deviceStateDown deviceState = iota deviceStateUp deviceStateClosed ) -- cgit v1.2.3-54-g00ecf