Skip to content

Commit

Permalink
Refine datatype of ValidateFirmwareTimeout parameter
Browse files Browse the repository at this point in the history
It's a length of time, so let's make it a Duration instead of an integer of an
implicit unit.
  • Loading branch information
zevweiss committed Aug 16, 2024
1 parent 5478bc5 commit d224de5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions condition/server_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package condition

import (
"encoding/json"
"time"

"github.com/google/uuid"
)
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit d224de5

Please sign in to comment.