From d09f4e25c25dced54d688597b5e9a903c456573d Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 23 Oct 2024 19:15:51 -0500 Subject: switched to pb.DropletState enum Signed-off-by: Jeff Carr --- event.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'event.go') diff --git a/event.go b/event.go index a030736..4358ab6 100644 --- a/event.go +++ b/event.go @@ -6,6 +6,7 @@ import ( "time" "go.wit.com/lib/gui/shell" + pb "go.wit.com/lib/protobuf/virtbuf" "go.wit.com/log" ) @@ -43,7 +44,7 @@ func clusterReady() (bool, string) { } func (d *DropletT) dropletReady() (bool, string) { - if d.CurrentState == "ON" { + if d.CurrentState == pb.DropletState_ON { return false, "EVENT start droplet is already ON" } if d.starts > 2 { @@ -86,7 +87,7 @@ func Start(name string) (bool, string) { return false, result } - if d.CurrentState == "ON" { + if d.CurrentState == pb.DropletState_ON { return false, "EVENT start droplet is already ON" } -- cgit v1.2.3