[#288] pkg/eacl: Document default values set in NewTarget

Document field values of instance constructed via `NewTarget`. Assert the
values in corresponding unit test.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-05-27 14:34:22 +03:00 committed by Leonard Lyubich
parent 5844096017
commit b81f39368e
2 changed files with 19 additions and 0 deletions

View file

@ -124,6 +124,10 @@ func (t *Target) ToV2() *v2acl.Target {
}
// NewTarget creates, initializes and returns blank Target instance.
//
// Defaults:
// - role: RoleUnknown;
// - keys: nil.
func NewTarget() *Target {
return NewTargetFromV2(new(v2acl.Target))
}