diff --git a/pkg/types/comment_type.go b/pkg/types/comment_type.go index 5e88e47c..8aed4759 100644 --- a/pkg/types/comment_type.go +++ b/pkg/types/comment_type.go @@ -13,15 +13,15 @@ import ( type CommentType uint8 // UnmarshalJSON implements the json.Unmarshaler interface. -func (ct *CommentType) UnmarshalJSON(bytes []byte) error { +func (ct *CommentType) UnmarshalJSON(data []byte) error { var i uint8 - if err := internal.UnmarshalJSON(bytes, &i); err != nil { + if err := internal.UnmarshalJSON(data, &i); err != nil { return err } c := CommentType(i) if _, ok := commentTypes[c]; !ok { - return badCommentType(bytes) + return badCommentType(data) } *ct = c diff --git a/pkg/types/notification_states.go b/pkg/types/notification_states.go index f6e91119..ff5760a3 100644 --- a/pkg/types/notification_states.go +++ b/pkg/types/notification_states.go @@ -12,9 +12,9 @@ import ( type NotificationStates uint8 // UnmarshalJSON implements the json.Unmarshaler interface. -func (nst *NotificationStates) UnmarshalJSON(bytes []byte) error { +func (nst *NotificationStates) UnmarshalJSON(data []byte) error { var states []string - if err := internal.UnmarshalJSON(bytes, &states); err != nil { + if err := internal.UnmarshalJSON(data, &states); err != nil { return err } diff --git a/pkg/types/notification_types.go b/pkg/types/notification_types.go index 2406dae4..832a515c 100644 --- a/pkg/types/notification_types.go +++ b/pkg/types/notification_types.go @@ -12,9 +12,9 @@ import ( type NotificationTypes uint16 // UnmarshalJSON implements the json.Unmarshaler interface. -func (nt *NotificationTypes) UnmarshalJSON(bytes []byte) error { +func (nt *NotificationTypes) UnmarshalJSON(data []byte) error { var types []string - if err := internal.UnmarshalJSON(bytes, &types); err != nil { + if err := internal.UnmarshalJSON(data, &types); err != nil { return err }