Skip to content

Commit

Permalink
[WIP] Remove Linters
Browse files Browse the repository at this point in the history
Signed-off-by: Yogesh Deshpande <[email protected]>
  • Loading branch information
yogeshbdeshpande committed Feb 21, 2024
1 parent d2e87ca commit e896c0d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions comid/example_cca_realm_refval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,14 @@ func extractRealmMeasurements(r *IntegrityRegisters) error {
if r == nil {
return fmt.Errorf("no integrity registers")
}

for i, r := range r.m {
switch t := i.(type) {
case string:
fmt.Printf("Index: %s\n", t)
extractRealmDigests(r)
if err := extractRealmDigests(r); err != nil {
return fmt.Errorf("invalid Digests for key: %s, %v", t, err)
}
default:
return fmt.Errorf("unexpected type for index: %T", t)
}
Expand All @@ -150,7 +153,7 @@ func extractRealmMeasurements(r *IntegrityRegisters) error {
func extractRealmDigests(digests Digests) error {

if err := digests.Valid(); err != nil {
return fmt.Errorf("invalid digtests %w:", err)
return fmt.Errorf("invalid digest: %v", err)
}
for _, d := range digests {
fmt.Printf("Alg: %s\n", d.AlgIDToString())
Expand Down

0 comments on commit e896c0d

Please sign in to comment.