diff --git a/client/common.go b/client/common.go index eff95724..5008a0d8 100644 --- a/client/common.go +++ b/client/common.go @@ -69,6 +69,7 @@ func (x prmCommonMeta) writeToMetaHeader(h *v2session.RequestMetaHeader) { const ( panicMsgMissingContext = "missing context" panicMsgMissingContainer = "missing container" + panicMsgMissingObject = "missing object" ) // groups all the details required to send a single request and process a response to it. diff --git a/client/object_delete.go b/client/object_delete.go index 543c1b41..eb7bb512 100644 --- a/client/object_delete.go +++ b/client/object_delete.go @@ -131,7 +131,7 @@ func (c *Client) ObjectDelete(ctx context.Context, prm PrmObjectDelete) (*ResObj case prm.addr.GetContainerID() == nil: panic(panicMsgMissingContainer) case prm.addr.GetObjectID() == nil: - panic("missing object") + panic(panicMsgMissingObject) } // form request body diff --git a/client/object_get.go b/client/object_get.go index c1a1ccb5..ab97d74d 100644 --- a/client/object_get.go +++ b/client/object_get.go @@ -319,7 +319,7 @@ func (c *Client) ObjectGetInit(ctx context.Context, prm PrmObjectGet) (*ObjectRe case !prm.cnrSet: panic(panicMsgMissingContainer) case !prm.objSet: - panic("missing object") + panic(panicMsgMissingObject) } var ( @@ -458,7 +458,7 @@ func (c *Client) ObjectHead(ctx context.Context, prm PrmObjectHead) (*ResObjectH case !prm.cnrSet: panic(panicMsgMissingContainer) case !prm.objSet: - panic("missing object") + panic(panicMsgMissingObject) } var ( @@ -729,7 +729,7 @@ func (c *Client) ObjectRangeInit(ctx context.Context, prm PrmObjectRange) (*Obje case !prm.cnrSet: panic(panicMsgMissingContainer) case !prm.objSet: - panic("missing object") + panic(panicMsgMissingObject) case prm.ln == 0: panic("zero range length") } diff --git a/client/object_hash.go b/client/object_hash.go index 9d0ae19b..8f9561b3 100644 --- a/client/object_hash.go +++ b/client/object_hash.go @@ -161,7 +161,7 @@ func (c *Client) ObjectHash(ctx context.Context, prm PrmObjectHash) (*ResObjectH case prm.addr.GetContainerID() == nil: panic(panicMsgMissingContainer) case prm.addr.GetObjectID() == nil: - panic("missing object") + panic(panicMsgMissingObject) case len(prm.body.GetRanges()) == 0: panic("missing ranges") }