From 2b8d2babfabe8f4fbbdb980ce2d15cb25d012606 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Tue, 29 Sep 2020 17:38:56 -0700 Subject: [PATCH] tailcfg: add IsZero methods to UserID and NodeID These will be helpful for doing some automated refactoring. Signed-off-by: Josh Bleecher Snyder --- tailcfg/tailcfg.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go index 631201c5a..87d186d92 100644 --- a/tailcfg/tailcfg.go +++ b/tailcfg/tailcfg.go @@ -27,10 +27,18 @@ type ID int64 type UserID ID +func (u UserID) IsZero() bool { + return u == 0 +} + type LoginID ID type NodeID ID +func (u NodeID) IsZero() bool { + return u == 0 +} + type GroupID ID type RoleID ID