mirror of
https://github.com/containers/podman.git
synced 2025-10-20 12:43:58 +08:00

First of all this removes the need for a network connection, second renovate can update the version as it is tracked in go.mod. However the real important part is that the binary downloads are broken[1]. For some reason the swagger created with them does not include all the type information for the examples. However when building from source the same thing works fine. [1] https://github.com/go-swagger/go-swagger/issues/2842 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
44 lines
1.9 KiB
Go
44 lines
1.9 KiB
Go
// Copyright 2016 Google Inc. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package uuid
|
|
|
|
import (
|
|
"io"
|
|
)
|
|
|
|
// randomBits completely fills slice b with random data.
|
|
func randomBits(b []byte) {
|
|
if _, err := io.ReadFull(rander, b); err != nil {
|
|
panic(err.Error()) // rand should never fail
|
|
}
|
|
}
|
|
|
|
// xvalues returns the value of a byte as a hexadecimal digit or 255.
|
|
var xvalues = [256]byte{
|
|
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 255, 255, 255, 255, 255,
|
|
255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
|
|
}
|
|
|
|
// xtob converts hex characters x1 and x2 into a byte.
|
|
func xtob(x1, x2 byte) (byte, bool) {
|
|
b1 := xvalues[x1]
|
|
b2 := xvalues[x2]
|
|
return (b1 << 4) | b2, b1 != 255 && b2 != 255
|
|
}
|