Skip to content

Commit

Permalink
fix: s/MarsahlJSON/MarshalJSON/g
Browse files Browse the repository at this point in the history
Also, fix related doc strings

Signed-off-by: Thomas Fossati <thomas.fossati@linaro.org>
  • Loading branch information
thomas-fossati authored and setrofim committed Sep 12, 2024
1 parent 4880c32 commit bd514d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions platform/claims.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ func (c *Claims) Validate() error {
// this type alias is used to prevent infinite recursion during marshaling.
type claims Claims

// MarshalCBOR encodes the claims into CBOR
// UnmarshalCBOR decodes the claims from CBOR
func (c *Claims) UnmarshalCBOR(buf []byte) error {
c.Profile = nil // clear profile to make sure we taked it from buf

return dm.Unmarshal(buf, (*claims)(c))
}

// UnmarshalCBOR decodes the claims from CBOR
// MarshalCBOR encodes the claims to CBOR
func (c Claims) MarshalCBOR() ([]byte, error) {

Check failure on line 98 in platform/claims.go

View workflow job for this annotation

GitHub Actions / Lint

hugeParam: c is heavy (96 bytes); consider passing it by pointer (gocritic)

Check failure on line 98 in platform/claims.go

View workflow job for this annotation

GitHub Actions / Lint

hugeParam: c is heavy (96 bytes); consider passing it by pointer (gocritic)
if c.SwComponents != nil && c.SwComponents.IsEmpty() {
c.SwComponents = nil
Expand All @@ -111,7 +111,7 @@ func (c *Claims) UnmarshalJSON(buf []byte) error {
}

// MarshalJSON encodes the claims into JSON
func (c Claims) MarsahlJSON() ([]byte, error) {
func (c Claims) MarshalJSON() ([]byte, error) {

Check failure on line 114 in platform/claims.go

View workflow job for this annotation

GitHub Actions / Lint

hugeParam: c is heavy (96 bytes); consider passing it by pointer (gocritic)

Check failure on line 114 in platform/claims.go

View workflow job for this annotation

GitHub Actions / Lint

hugeParam: c is heavy (96 bytes); consider passing it by pointer (gocritic)
if c.SwComponents != nil && c.SwComponents.IsEmpty() {
c.SwComponents = nil
}
Expand Down

0 comments on commit bd514d7

Please sign in to comment.