From ba3dedce8185dd41203c46fca4817e4bab4c725d Mon Sep 17 00:00:00 2001 From: Thomas Fossati Date: Thu, 12 Sep 2024 15:01:14 +0200 Subject: [PATCH] fix: s/MarsahlJSON/MarshalJSON/g Also, fix related doc strings Signed-off-by: Thomas Fossati --- platform/claims.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/claims.go b/platform/claims.go index 6aa364b..258ab6c 100644 --- a/platform/claims.go +++ b/platform/claims.go @@ -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) { if c.SwComponents != nil && c.SwComponents.IsEmpty() { c.SwComponents = nil @@ -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) { if c.SwComponents != nil && c.SwComponents.IsEmpty() { c.SwComponents = nil }