Fix handling of attest extra arguments

Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
This commit is contained in:
Laurent Goderre
2025-02-27 10:42:09 -05:00
committed by CrazyMax
parent 41f8e5c85c
commit 6da88e1555
2 changed files with 14 additions and 5 deletions

View File

@@ -148,9 +148,8 @@ func (a *Attest) UnmarshalText(text []byte) error {
if !ok {
return errors.Errorf("invalid value %s", field)
}
key = strings.TrimSpace(strings.ToLower(key))
switch key {
switch strings.TrimSpace(strings.ToLower(key)) {
case "type":
a.Type = value
case "disabled":