Skip to content

Commit

Permalink
fixup! refactor: Run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmidyson committed Oct 30, 2024
1 parent b86bbd9 commit db9cecb
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
10 changes: 8 additions & 2 deletions cmd/copy-file-to-pod/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ func main() {
rootKubectlArgs = append(rootKubectlArgs, "--kubeconfig", *kubeconfig)
}

cpCmd := cp.NewCmdCp(f, genericiooptions.IOStreams{In: os.Stdin, Out: os.Stdout, ErrOut: os.Stderr})
cpCmd := cp.NewCmdCp(
f,
genericiooptions.IOStreams{In: os.Stdin, Out: os.Stdout, ErrOut: os.Stderr},
)
kubeConfigFlags.AddFlags(cpCmd.Flags())
matchVersionKubeConfigFlags.AddFlags(cpCmd.Flags())

Expand All @@ -86,7 +89,10 @@ func main() {
exit("failed to copy file to pod: %v", err)
}

execCmd := exec.NewCmdExec(f, genericiooptions.IOStreams{In: os.Stdin, Out: os.Stdout, ErrOut: os.Stderr})
execCmd := exec.NewCmdExec(
f,
genericiooptions.IOStreams{In: os.Stdin, Out: os.Stdout, ErrOut: os.Stderr},
)
kubeConfigFlags.AddFlags(execCmd.Flags())
matchVersionKubeConfigFlags.AddFlags(execCmd.Flags())

Expand Down
13 changes: 10 additions & 3 deletions cmd/mindthegap/push/bundle/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ func NewCommand(out output.Output, bundleCmdName string) *cobra.Command {
cmd.Flags().
IntVar(&imagePushConcurrency, "image-push-concurrency", 1, "Image push concurrency")

cmd.Flags().BoolVar(&forceOCIMediaTypes, "force-oci-media-types", false, "force OCI media types")
cmd.Flags().
BoolVar(&forceOCIMediaTypes, "force-oci-media-types", false, "force OCI media types")

return cmd
}
Expand Down Expand Up @@ -564,7 +565,9 @@ func convertToOCIIndex(
manifest := originalIdx.Manifests[i]
manifest.MediaType = mediatypes.OCIManifestSchema1

digestRef, err := name.NewDigest(fmt.Sprintf("%s@%s", srcImage.Context().Name(), manifest.Digest.String()))
digestRef, err := name.NewDigest(
fmt.Sprintf("%s@%s", srcImage.Context().Name(), manifest.Digest.String()),
)
if err != nil {
return nil, fmt.Errorf("failed to create digest reference: %w", err)
}
Expand All @@ -576,7 +579,11 @@ func convertToOCIIndex(

img, err := imgDesc.Image()
if err != nil {
return nil, fmt.Errorf("failed to convert image descriptor for %q to image: %w", digestRef, err)
return nil, fmt.Errorf(
"failed to convert image descriptor for %q to image: %w",
digestRef,
err,
)
}

ociImg := empty.Image
Expand Down
6 changes: 5 additions & 1 deletion cmd/wait-for-file-to-exist/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ func main() {
// inotify.
dirPath, err := filepath.EvalSymlinks(filepath.Dir(fileToWaitFor))
if err != nil {
exit("failed to evaluate any symlinks to read real directory for %q: %v", fileToWaitFor, err)
exit(
"failed to evaluate any symlinks to read real directory for %q: %v",
fileToWaitFor,
err,
)
}

if dirPath != filepath.Dir(fileToWaitFor) {
Expand Down
6 changes: 5 additions & 1 deletion docker/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ log:
}

if freePort <= 0 || freePort > math.MaxUint16 {
return "", fmt.Errorf("invalid free port - must be between 1 and %d inclusive: %d", freePort, math.MaxUint16)
return "", fmt.Errorf(
"invalid free port - must be between 1 and %d inclusive: %d",
freePort,
math.MaxUint16,
)
}
port = uint16(freePort)
}
Expand Down

0 comments on commit db9cecb

Please sign in to comment.