1- // Copyright (c) 2018-2021 , Sylabs Inc. All rights reserved.
1+ // Copyright (c) 2018-2022 , Sylabs Inc. All rights reserved.
22// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
33// Copyright (c) 2017, Yannick Cote <[email protected] > All rights reserved. 44// This software is licensed under a 3-clause BSD license. Please consult the
@@ -96,7 +96,7 @@ func (d *rawDescriptor) setExtra(v interface{}) error {
9696}
9797
9898// getPartitionMetadata gets metadata for a partition data object.
99- func (d rawDescriptor ) getPartitionMetadata () (fs FSType , pt PartType , arch string , err error ) {
99+ func (d rawDescriptor ) getPartitionMetadata () (FSType , PartType , string , error ) {
100100 if got , want := d .DataType , DataPartition ; got != want {
101101 return 0 , 0 , "" , & unexpectedDataTypeError {got , []DataType {want }}
102102 }
@@ -142,6 +142,7 @@ func (d Descriptor) GroupID() uint32 { return d.raw.GroupID &^ descrGroupMask }
142142// LinkedID returns the object/group ID d is linked to, or zero if d does not contain a linked
143143// ID. If isGroup is true, the returned id is an object group ID. Otherwise, the returned id is a
144144// data object ID.
145+ //nolint:nonamedreturns // Named returns effective as documentation.
145146func (d Descriptor ) LinkedID () (id uint32 , isGroup bool ) {
146147 return d .raw .LinkedID &^ descrGroupMask , d .raw .LinkedID & descrGroupMask == descrGroupMask
147148}
@@ -162,6 +163,7 @@ func (d Descriptor) ModifiedAt() time.Time { return time.Unix(d.raw.ModifiedAt,
162163func (d Descriptor ) Name () string { return strings .TrimRight (string (d .raw .Name [:]), "\000 " ) }
163164
164165// PartitionMetadata gets metadata for a partition data object.
166+ //nolint:nonamedreturns // Named returns effective as documentation.
165167func (d Descriptor ) PartitionMetadata () (fs FSType , pt PartType , arch string , err error ) {
166168 return d .raw .getPartitionMetadata ()
167169}
@@ -186,6 +188,7 @@ func getHashType(ht hashType) (crypto.Hash, error) {
186188}
187189
188190// SignatureMetadata gets metadata for a signature data object.
191+ //nolint:nonamedreturns // Named returns effective as documentation.
189192func (d Descriptor ) SignatureMetadata () (ht crypto.Hash , fp []byte , err error ) {
190193 if got , want := d .raw .DataType , DataSignature ; got != want {
191194 return ht , fp , & unexpectedDataTypeError {got , []DataType {want }}
0 commit comments