Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: s/MarsahlJSON/MarshalJSON/g #34

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions platform/claims.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@
// 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 @@
}

// 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
Loading