From ad0b01e892dd4d8a9b4c92082caece27d5663462 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 22 Oct 2020 19:10:42 +0300 Subject: [PATCH] [#172] Improve the readability of named attribute constants Signed-off-by: Leonard Lyubich --- pkg/container/wellknown_attributes.go | 8 ++++---- pkg/object/wellknown_attributes.go | 12 ++++++------ v2/container/attributes.go | 8 ++++---- v2/object/attributes.go | 12 ++++++------ 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/pkg/container/wellknown_attributes.go b/pkg/container/wellknown_attributes.go index 143be14..241c745 100644 --- a/pkg/container/wellknown_attributes.go +++ b/pkg/container/wellknown_attributes.go @@ -1,11 +1,11 @@ package container const ( - // AttrName is an attribute key that is commonly used to denote + // AttributeName is an attribute key that is commonly used to denote // human-friendly name. - AttrName = "Name" + AttributeName = "Name" - // AttrTimestamp is an attribute key that is commonly used to denote + // AttributeTimestamp is an attribute key that is commonly used to denote // user-defined local time of container creation in Unix Timestamp format. - AttrTimestamp = "Timestamp" + AttributeTimestamp = "Timestamp" ) diff --git a/pkg/object/wellknown_attributes.go b/pkg/object/wellknown_attributes.go index 3c9df3d..423b5fb 100644 --- a/pkg/object/wellknown_attributes.go +++ b/pkg/object/wellknown_attributes.go @@ -1,15 +1,15 @@ package object const ( - // AttrName is an attribute key that is commonly used to denote + // AttributeName is an attribute key that is commonly used to denote // human-friendly name. - AttrName = "Name" + AttributeName = "Name" - // AttrFileName is an attribute key that is commonly used to denote + // AttributeFileName is an attribute key that is commonly used to denote // file name to be associated with the object on saving. - AttrFileName = "FileName" + AttributeFileName = "FileName" - // AttrTimestamp is an attribute key that is commonly used to denote + // AttributeTimestamp is an attribute key that is commonly used to denote // user-defined local time of object creation in Unix Timestamp format. - AttrTimestamp = "Timestamp" + AttributeTimestamp = "Timestamp" ) diff --git a/v2/container/attributes.go b/v2/container/attributes.go index 2dc0c92..b91dcc6 100644 --- a/v2/container/attributes.go +++ b/v2/container/attributes.go @@ -1,9 +1,9 @@ package container -// SysAttrPrefix is a prefix of key to system attribute. -const SysAttrPrefix = "__NEOFS__" +// SysAttributePrefix is a prefix of key to system attribute. +const SysAttributePrefix = "__NEOFS__" const ( - // SysAttrSubnet is a string ID of container's storage subnet. - SysAttrSubnet = SysAttrPrefix + "SUBNET" + // SysAttributeSubnet is a string ID of container's storage subnet. + SysAttributeSubnet = SysAttributePrefix + "SUBNET" ) diff --git a/v2/object/attributes.go b/v2/object/attributes.go index 0da07b8..6a9dfd2 100644 --- a/v2/object/attributes.go +++ b/v2/object/attributes.go @@ -1,12 +1,12 @@ package object -// SysAttrPrefix is a prefix of key to system attribute. -const SysAttrPrefix = "__NEOFS__" +// SysAttributePrefix is a prefix of key to system attribute. +const SysAttributePrefix = "__NEOFS__" const ( - // SysAttrUploadID marks smaller parts of a split bigger object. - SysAttrUploadID = SysAttrPrefix + "UPLOAD_ID" + // SysAttributeUploadID marks smaller parts of a split bigger object. + SysAttributeUploadID = SysAttributePrefix + "UPLOAD_ID" - // SysAttrExpEpoch tells GC to delete object after that epoch. - SysAttrExpEpoch = SysAttrPrefix + "EXPIRATION_EPOCH" + // SysAttributeExpEpoch tells GC to delete object after that epoch. + SysAttributeExpEpoch = SysAttributePrefix + "EXPIRATION_EPOCH" )