summaryrefslogtreecommitdiff
path: root/hack/podman-registry-go/registry.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-26 14:36:30 -0400
committerGitHub <noreply@github.com>2022-04-26 14:36:30 -0400
commit5ac00a7287e4a9e6292f4a6ca5dfa9a02e5ca907 (patch)
treef1b0d8018be8e57d8a01ed43b623add31e847979 /hack/podman-registry-go/registry.go
parentd504c3cf85852bdda57c819df0df1d99db59bc19 (diff)
parentfacc009ca070085bb1c32f146f77c2a0a62090b0 (diff)
downloadpodman-5ac00a7287e4a9e6292f4a6ca5dfa9a02e5ca907.tar.gz
podman-5ac00a7287e4a9e6292f4a6ca5dfa9a02e5ca907.tar.bz2
podman-5ac00a7287e4a9e6292f4a6ca5dfa9a02e5ca907.zip
Merge pull request #14009 from vrothberg/add-benchmarks
benchmarks: add more image benchmarks
Diffstat (limited to 'hack/podman-registry-go/registry.go')
-rw-r--r--hack/podman-registry-go/registry.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/hack/podman-registry-go/registry.go b/hack/podman-registry-go/registry.go
index 143a83fa1..095f6fb18 100644
--- a/hack/podman-registry-go/registry.go
+++ b/hack/podman-registry-go/registry.go
@@ -9,10 +9,10 @@ import (
)
const (
- imageKey = "PODMAN_REGISTRY_IMAGE"
- userKey = "PODMAN_REGISTRY_USER"
- passKey = "PODMAN_REGISTRY_PASS"
- portKey = "PODMAN_REGISTRY_PORT"
+ ImageKey = "PODMAN_REGISTRY_IMAGE"
+ UserKey = "PODMAN_REGISTRY_USER"
+ PassKey = "PODMAN_REGISTRY_PASS"
+ PortKey = "PODMAN_REGISTRY_PORT"
)
var binary = "podman-registry"
@@ -52,13 +52,13 @@ func Start() (*Registry, error) {
key := spl[0]
val := strings.TrimSuffix(strings.TrimPrefix(spl[1], "\""), "\"")
switch key {
- case imageKey:
+ case ImageKey:
registry.Image = val
- case userKey:
+ case UserKey:
registry.User = val
- case passKey:
+ case PassKey:
registry.Password = val
- case portKey:
+ case PortKey:
registry.Port = val
default:
logrus.Errorf("Unexpected podman-registry output: %q", s)
@@ -67,16 +67,16 @@ func Start() (*Registry, error) {
// Extra sanity check.
if registry.Image == "" {
- return nil, errors.Errorf("unexpected output %q: %q missing", out, imageKey)
+ return nil, errors.Errorf("unexpected output %q: %q missing", out, ImageKey)
}
if registry.User == "" {
- return nil, errors.Errorf("unexpected output %q: %q missing", out, userKey)
+ return nil, errors.Errorf("unexpected output %q: %q missing", out, UserKey)
}
if registry.Password == "" {
- return nil, errors.Errorf("unexpected output %q: %q missing", out, passKey)
+ return nil, errors.Errorf("unexpected output %q: %q missing", out, PassKey)
}
if registry.Port == "" {
- return nil, errors.Errorf("unexpected output %q: %q missing", out, portKey)
+ return nil, errors.Errorf("unexpected output %q: %q missing", out, PortKey)
}
registry.running = true