aboutsummaryrefslogtreecommitdiff
path: root/device/device.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-02-09 15:39:19 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-02-09 15:39:19 +0100
commiteaf664e4e9134ab7d5100d7284274a821122fbbc (patch)
tree561a3c570d96016f71714501f68605e787151960 /device/device.go
parenta816e8511eb45975e8e0e4199c3481989953fd56 (diff)
downloadwireguard-go-eaf664e4e9134ab7d5100d7284274a821122fbbc.tar.gz
wireguard-go-eaf664e4e9134ab7d5100d7284274a821122fbbc.zip
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 <Jason@zx2c4.com>
Diffstat (limited to 'device/device.go')
-rw-r--r--device/device.go14
1 files changed, 6 insertions, 8 deletions
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
)