Skip to content

Commit

Permalink
Fix some linters
Browse files Browse the repository at this point in the history
Signed-off-by: Yogesh Deshpande <[email protected]>
  • Loading branch information
yogeshbdeshpande committed Jan 24, 2025
1 parent 7f1ccb9 commit f6f2865
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 44 deletions.
32 changes: 0 additions & 32 deletions comid/tdx-profile/cbor.go

This file was deleted.

6 changes: 3 additions & 3 deletions comid/tdx-profile/example_seam_refval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ func decodeMValExtensions(m comid.Measurement) error {
fmt.Printf("val was not pointer to IsvProdID")
}
if tS.IsBytesIsvProdID() {
b, err := tS.GetBytesIsvProdID()
if err != nil {
return fmt.Errorf("failed to decode isvprodid: %w", err)
b, err1 := tS.GetBytesIsvProdID()
if err1 != nil {
return fmt.Errorf("failed to decode isvprodid: %w", err1)
}
fmt.Printf("\nIsvProdID: %x", b)
} else if tS.IsUintIsvProdID() {
Expand Down
4 changes: 2 additions & 2 deletions comid/tdx-profile/teeadvisoryid.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "fmt"
type TeeAdvisoryID setType

func NewTeeAdvisory(val []any) *TeeAdvisoryID {
var adv []string
var adv TeeAdvisoryID
if len(val) == 0 {
fmt.Printf("nothing specified for val")
return nil
Expand All @@ -19,7 +19,7 @@ func NewTeeAdvisory(val []any) *TeeAdvisoryID {
return nil
}
}
return nil
return &adv
}

func (o *TeeAdvisoryID) AddAdvisory(val []any) error {
Expand Down
6 changes: 3 additions & 3 deletions comid/tdx-profile/teetcbstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "fmt"
type TeeTcbStatus setType

func NewTeeTcbStatus(val []any) *TeeTcbStatus {
var adv []string
var ts TeeTcbStatus
if len(val) == 0 {
fmt.Printf("nothing specified for val")
return nil
Expand All @@ -14,12 +14,12 @@ func NewTeeTcbStatus(val []any) *TeeTcbStatus {
for _, v := range val {
switch t := v.(type) {
case string:
adv = append(adv, t)
ts = append(ts, t)
default:
return nil
}
}
return nil
return &ts
}

func (o *TeeTcbStatus) AddStatus(val []any) error {
Expand Down
4 changes: 0 additions & 4 deletions comid/tdx-profile/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ type teeDigest comid.Digests

type setType []any

type teeTcbStatus setType

type teeTcbEvalNum uint

type teeTcbCompSvn [16]teeSVN

type teeCryptoKey comid.CryptoKey

type teeAdvisoryID []string

0 comments on commit f6f2865

Please sign in to comment.