forked from TrueCloudLab/frostfs-api-go
[#302] pkg/container: Document default values set in New
Make `nil` as a default value for attributes. Document field values of instance constructed via `New`. Assert the values in corresponding unit test. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
c08b90dbbc
commit
f92f9cd424
3 changed files with 46 additions and 2 deletions
|
@ -20,6 +20,17 @@ type Container struct {
|
|||
sig *pkg.Signature
|
||||
}
|
||||
|
||||
// New creates, initializes and returns blank Container instance.
|
||||
//
|
||||
// Defaults:
|
||||
// - token: nil;
|
||||
// - sig: nil;
|
||||
// - basicACL: acl.PrivateBasicRule;
|
||||
// - version: nil;
|
||||
// - nonce: random UUID;
|
||||
// - attr: nil;
|
||||
// - policy: nil;
|
||||
// - ownerID: nil.
|
||||
func New(opts ...NewOption) *Container {
|
||||
cnrOptions := defaultContainerOptions()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue