[#302] pkg/object: Document default values set in NewAttribute
Document field values of instance constructed via `NewAttribute`. Assert the values in corresponding unit test. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
941b513eb3
commit
ff851215b0
2 changed files with 20 additions and 0 deletions
|
@ -17,6 +17,10 @@ func NewAttributeFromV2(aV2 *object.Attribute) *Attribute {
|
|||
// NewAttribute creates and initializes blank Attribute.
|
||||
//
|
||||
// Works similar as NewAttributeFromV2(new(Attribute)).
|
||||
//
|
||||
// Defaults:
|
||||
// - key: "";
|
||||
// - value: "".
|
||||
func NewAttribute() *Attribute {
|
||||
return NewAttributeFromV2(new(object.Attribute))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue