mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to master@9624ab4
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
5
vendor/github.com/moby/buildkit/identity/randomid.go
generated
vendored
5
vendor/github.com/moby/buildkit/identity/randomid.go
generated
vendored
@ -2,9 +2,10 @@ package identity
|
||||
|
||||
import (
|
||||
cryptorand "crypto/rand"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/big"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -45,7 +46,7 @@ func NewID() string {
|
||||
var p [randomIDEntropyBytes]byte
|
||||
|
||||
if _, err := io.ReadFull(idReader, p[:]); err != nil {
|
||||
panic(fmt.Errorf("failed to read random bytes: %v", err))
|
||||
panic(errors.Wrap(err, "failed to read random bytes: %v"))
|
||||
}
|
||||
|
||||
p[0] |= 0x80 // set high bit to avoid the need for padding
|
||||
|
Reference in New Issue
Block a user