[#135] sdk/container: Fix IDFromV2 nil-behavior
Remove nil if-statement from IDFromV2 function to which avoids checking the correctness of the identifier format. From now IDFromV2 returns format error on nil argument. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
047bae63d0
commit
8e9d456038
1 changed files with 0 additions and 4 deletions
|
@ -33,10 +33,6 @@ func (id *ID) ToV2() *refs.ContainerID {
|
|||
}
|
||||
|
||||
func IDFromV2(idV2 *refs.ContainerID) (*ID, error) {
|
||||
if idV2 == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
val := idV2.GetValue()
|
||||
if ln := len(val); ln != sha256.Size {
|
||||
return nil, errors.Errorf(
|
||||
|
|
Loading…
Reference in a new issue