-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #226 Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
- Loading branch information
Showing
12 changed files
with
267 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
package object | ||
|
||
// SplitInfoError is a special error that means that the original object is a large one (split into a number of smaller objects). | ||
type SplitInfoError struct { | ||
si *SplitInfo | ||
} | ||
|
||
const splitInfoErrorMsg = "object not found, split info has been provided" | ||
|
||
// Error implements the error interface. | ||
func (s *SplitInfoError) Error() string { | ||
return splitInfoErrorMsg | ||
} | ||
|
||
// SplitInfo returns [SplitInfo] data. | ||
func (s *SplitInfoError) SplitInfo() *SplitInfo { | ||
return s.si | ||
} | ||
|
||
// NewSplitInfoError is a constructor for [SplitInfoError]. | ||
func NewSplitInfoError(v *SplitInfo) *SplitInfoError { | ||
return &SplitInfoError{si: v} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.