From d224de5fe681fda9e1460ee9ff87400fcf0ecd8c Mon Sep 17 00:00:00 2001 From: Zev Weiss Date: Mon, 12 Aug 2024 16:08:33 -0700 Subject: [PATCH] Refine datatype of ValidateFirmwareTimeout parameter It's a length of time, so let's make it a Duration instead of an integer of an implicit unit. --- condition/server_control.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/condition/server_control.go b/condition/server_control.go index 4fbd96b..ac9ac27 100644 --- a/condition/server_control.go +++ b/condition/server_control.go @@ -2,6 +2,7 @@ package condition import ( "encoding/json" + "time" "github.com/google/uuid" ) @@ -80,9 +81,9 @@ type ServerControlTaskParameters struct { // Required: false SetNextBootDeviceEFI bool `json:"set_next_boot_device_efi"` - // The timeout in seconds for a ValidateFirmware action + // The timeout for a ValidateFirmware action // Required for ValidateFirmware. - ValidateFirmwareTimeout uint `json:"validate_firmware_timeout"` + ValidateFirmwareTimeout time.Duration `json:"validate_firmware_timeout"` } func (p *ServerControlTaskParameters) Unmarshal(r json.RawMessage) error {