fix: format enum value

Fixed in #415
This commit is contained in:
Alec Thomas
2024-11-03 14:00:32 +11:00
parent 7bbb0b76ad
commit 64229c9fe7
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -996,7 +996,7 @@ func checkEnum(value *Value, target reflect.Value) error {
}
enums = append(enums, fmt.Sprintf("%q", enum))
}
return fmt.Errorf("%s must be one of %s but got %q", value.ShortSummary(), strings.Join(enums, ","), target.Interface())
return fmt.Errorf("%s must be one of %s but got %q", value.ShortSummary(), strings.Join(enums, ","), fmt.Sprintf("%v", target.Interface()))
}
}