From 9870422db9f5087b86b69033f00fd343ea88e6f1 Mon Sep 17 00:00:00 2001 From: Russ Egan Date: Mon, 5 Sep 2022 21:04:28 -0500 Subject: [PATCH] fix some lint issues --- kmip20/op_activate.go | 2 ++ kmip20/op_destroy.go | 1 + kmip20/op_get.go | 2 +- kmip20/op_locate.go | 1 + kmip20/op_query.go | 1 + kmip20/op_revoke.go | 1 + kmip20/op_setattribute.go | 1 + 7 files changed, 8 insertions(+), 1 deletion(-) diff --git a/kmip20/op_activate.go b/kmip20/op_activate.go index 244e27e..e7394de 100644 --- a/kmip20/op_activate.go +++ b/kmip20/op_activate.go @@ -1,3 +1,4 @@ +//nolint:dupl package kmip20 import ( @@ -26,6 +27,7 @@ type ActivateHandler struct { func (h *ActivateHandler) HandleItem(ctx context.Context, req *kmip.Request) (*kmip.ResponseBatchItem, error) { var payload ActivateRequestPayload + err := req.DecodePayload(&payload) if err != nil { return nil, err diff --git a/kmip20/op_destroy.go b/kmip20/op_destroy.go index 964ad6a..dde84ac 100755 --- a/kmip20/op_destroy.go +++ b/kmip20/op_destroy.go @@ -1,3 +1,4 @@ +//nolint:dupl package kmip20 import ( diff --git a/kmip20/op_get.go b/kmip20/op_get.go index 10fe814..8dc6057 100755 --- a/kmip20/op_get.go +++ b/kmip20/op_get.go @@ -8,7 +8,6 @@ import ( ) // GetRequestPayload //////////////////////////////////////// -// type GetRequestPayload struct { UniqueIdentifier *UniqueIdentifierValue } @@ -26,6 +25,7 @@ type GetHandler struct { func (h *GetHandler) HandleItem(ctx context.Context, req *kmip.Request) (*kmip.ResponseBatchItem, error) { var payload GetRequestPayload + err := req.DecodePayload(&payload) if err != nil { return nil, err diff --git a/kmip20/op_locate.go b/kmip20/op_locate.go index 27766a1..feb5352 100644 --- a/kmip20/op_locate.go +++ b/kmip20/op_locate.go @@ -26,6 +26,7 @@ type LocateHandler struct { func (h *LocateHandler) HandleItem(ctx context.Context, req *kmip.Request) (*kmip.ResponseBatchItem, error) { var payload LocateRequestPayload + err := req.DecodePayload(&payload) if err != nil { return nil, err diff --git a/kmip20/op_query.go b/kmip20/op_query.go index 00185ac..696a2da 100644 --- a/kmip20/op_query.go +++ b/kmip20/op_query.go @@ -118,6 +118,7 @@ type QueryHandler struct { func (h *QueryHandler) HandleItem(ctx context.Context, req *kmip.Request) (*kmip.ResponseBatchItem, error) { var payload QueryRequestPayload + err := req.DecodePayload(&payload) if err != nil { return nil, err diff --git a/kmip20/op_revoke.go b/kmip20/op_revoke.go index 6c13e89..5922d48 100644 --- a/kmip20/op_revoke.go +++ b/kmip20/op_revoke.go @@ -34,6 +34,7 @@ type RevokeHandler struct { func (h *RevokeHandler) HandleItem(ctx context.Context, req *kmip.Request) (*kmip.ResponseBatchItem, error) { var payload RevokeRequestPayload + err := req.DecodePayload(&payload) if err != nil { return nil, err diff --git a/kmip20/op_setattribute.go b/kmip20/op_setattribute.go index c4b3a5c..2180616 100644 --- a/kmip20/op_setattribute.go +++ b/kmip20/op_setattribute.go @@ -27,6 +27,7 @@ type SetAttributeHandler struct { func (h *SetAttributeHandler) HandleItem(ctx context.Context, req *kmip.Request) (*kmip.ResponseBatchItem, error) { var payload SetAttributeRequestPayload + err := req.DecodePayload(&payload) if err != nil { return nil, err