Reformat with Go 1.19's gofmt

This is just the minimal update; I didn't review all
existing comments for using all the new syntax.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač 2022-08-10 20:05:19 +02:00
parent 9e79da5e33
commit fa2b15ff76
2 changed files with 9 additions and 5 deletions

View File

@ -30,11 +30,11 @@ type errorShouldDisplayUsage struct {
// The error for closeErr is annotated with description (which is not a format string) // The error for closeErr is annotated with description (which is not a format string)
// Typical usage: // Typical usage:
// //
// defer func() { // defer func() {
// if err := something.Close(); err != nil { // if err := something.Close(); err != nil {
// returnedErr = noteCloseFailure(returnedErr, "closing something", err) // returnedErr = noteCloseFailure(returnedErr, "closing something", err)
// } // }
// } // }
func noteCloseFailure(err error, description string, closeErr error) error { func noteCloseFailure(err error, description string, closeErr error) error {
// We dont accept a Closer() and close it ourselves because signature.PolicyContext has .Destroy(), not .Close(). // We dont accept a Closer() and close it ourselves because signature.PolicyContext has .Destroy(), not .Close().
// This also makes it harder for a caller to do // This also makes it harder for a caller to do

View File

@ -15,11 +15,15 @@ TestRunShell is not really a test; it is a convenient way to use the registry se
in openshift.go and CopySuite to get an interactive environment for experimentation. in openshift.go and CopySuite to get an interactive environment for experimentation.
To use it, run: To use it, run:
sudo make shell sudo make shell
to start a container, then within the container: to start a container, then within the container:
SKOPEO_CONTAINER_TESTS=1 PS1='nested> ' go test -tags openshift_shell -timeout=24h ./integration -v -check.v -check.vv -check.f='CopySuite.TestRunShell' SKOPEO_CONTAINER_TESTS=1 PS1='nested> ' go test -tags openshift_shell -timeout=24h ./integration -v -check.v -check.vv -check.f='CopySuite.TestRunShell'
An example of what can be done within the container: An example of what can be done within the container:
cd ..; make bin/skopeo PREFIX=/usr install cd ..; make bin/skopeo PREFIX=/usr install
./skopeo --tls-verify=false copy --sign-by=personal@example.com docker://quay.io/libpod/busybox:latest atomic:localhost:5000/myns/personal:personal ./skopeo --tls-verify=false copy --sign-by=personal@example.com docker://quay.io/libpod/busybox:latest atomic:localhost:5000/myns/personal:personal
oc get istag personal:personal -o json oc get istag personal:personal -o json