Skip to content

Commit 17383a3

Browse files
committed
fixup! provisionerd tests pass!
1 parent 6248291 commit 17383a3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

provisioner/echo/serve.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,12 @@ func (e *echo) Provision(stream proto.DRPCProvisioner_ProvisionStream) error {
118118
}
119119

120120
var config *proto.Provision_Config
121-
if msg.GetPlan() != nil {
121+
switch {
122+
case msg.GetPlan() != nil:
122123
config = msg.GetPlan().GetConfig()
123-
} else if msg.GetApply() != nil {
124+
case msg.GetApply() != nil:
124125
config = msg.GetApply().GetConfig()
125-
} else {
126+
default:
126127
// Probably a cancel
127128
return nil
128129
}

0 commit comments

Comments
 (0)