mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
hash: document that Clone may only return ErrUnsupported or a nil error
Updates #69521 Change-Id: I6a6a6964ce384a80c4c89efe67c260dc6e9ed6c8 Reviewed-on: https://go-review.googlesource.com/c/go/+/685235 Auto-Submit: Filippo Valsorda <filippo@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Austin Clements <austin@google.com>
This commit is contained in:
parent
b325151453
commit
dd687c3860
1 changed files with 2 additions and 1 deletions
|
|
@ -64,7 +64,8 @@ type Hash64 interface {
|
||||||
// unless GOFIPS140=v1.0.0 is set.
|
// unless GOFIPS140=v1.0.0 is set.
|
||||||
//
|
//
|
||||||
// If a hash can only determine at runtime if it can be cloned (e.g. if it wraps
|
// If a hash can only determine at runtime if it can be cloned (e.g. if it wraps
|
||||||
// another hash), it may return an error wrapping [errors.ErrUnsupported].
|
// another hash), Clone may return an error wrapping [errors.ErrUnsupported].
|
||||||
|
// Otherwise, Clone must always return a nil error.
|
||||||
type Cloner interface {
|
type Cloner interface {
|
||||||
Hash
|
Hash
|
||||||
Clone() (Cloner, error)
|
Clone() (Cloner, error)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue