Skip to content

Commit be9bdaf

Browse files
committed
fix log formatting
Signed-off-by: Ankita Thomas <[email protected]>
1 parent 4fefd48 commit be9bdaf

File tree

9 files changed

+21
-21
lines changed

9 files changed

+21
-21
lines changed

internal/cmd/internal/olmv1/catalog_create.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ type catalogCreateOptions struct {
2020
mutableCatalogOptions
2121
}
2222

23-
// NewCatalogCreateCmd creates a new catalog, requiring a minimum
24-
// of a name for the new catalog and a source image reference
23+
// NewCatalogCreateCmd returns a command that creates a new catalog.
24+
// At minimum, the catalog name and the source image reference must be provided.
2525
func NewCatalogCreateCmd(cfg *action.Configuration) *cobra.Command {
2626
i := v1action.NewCatalogCreate(cfg)
2727
i.Logf = log.Printf
@@ -37,7 +37,7 @@ func NewCatalogCreateCmd(cfg *action.Configuration) *cobra.Command {
3737
i.ImageSourceRef = args[1]
3838
opts.Image = i.ImageSourceRef
3939
if err := opts.validate(); err != nil {
40-
log.Fatalf("failed to parse flags: %w", err)
40+
log.Fatalf("failed to parse flags: %v", err)
4141
}
4242
i.DryRun = opts.DryRun
4343
i.Output = opts.Output
@@ -47,7 +47,7 @@ func NewCatalogCreateCmd(cfg *action.Configuration) *cobra.Command {
4747
i.PollIntervalMinutes = opts.PollIntervalMinutes
4848
catalogObj, err := i.Run(cmd.Context())
4949
if err != nil {
50-
log.Fatalf("failed to create catalog %q: %w", i.CatalogName, err)
50+
log.Fatalf("failed to create catalog %q: %v", i.CatalogName, err)
5151
}
5252
if len(i.DryRun) == 0 {
5353
log.Printf("catalog %q created", i.CatalogName)

internal/cmd/internal/olmv1/catalog_delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func NewCatalogDeleteCmd(cfg *action.Configuration) *cobra.Command {
3636
i.CatalogName = args[0]
3737
}
3838
if err := opts.validate(); err != nil {
39-
log.Fatalf("failed to parse flags: %w", err)
39+
log.Fatalf("failed to parse flags: %v", err)
4040
}
4141
i.DryRun = opts.DryRun
4242
i.Output = opts.Output

internal/cmd/internal/olmv1/catalog_get.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ func NewCatalogInstalledGetCmd(cfg *action.Configuration) *cobra.Command {
3030
i.CatalogName = args[0]
3131
}
3232
if err := opts.validate(); err != nil {
33-
log.Fatalf("failed to parse flags: %w", err)
33+
log.Fatalf("failed to parse flags: %v", err)
3434
}
3535
i.Selector = opts.ParsedSelector
3636
installedCatalogs, err := i.Run(cmd.Context())
3737
if err != nil {
38-
log.Fatalf("failed getting installed catalog(s): %w", err)
38+
log.Fatalf("failed getting installed catalog(s): %v", err)
3939
}
4040

4141
for i := range installedCatalogs {

internal/cmd/internal/olmv1/catalog_search.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ func NewCatalogSearchCmd(cfg *action.Configuration) *cobra.Command {
2929
Short: "Search catalogs for installable packages matching parameters",
3030
Run: func(cmd *cobra.Command, args []string) {
3131
if err := opts.validate(); err != nil {
32-
log.Fatalf("failed to parse flags: %w", err)
32+
log.Fatalf("failed to parse flags: %v", err)
3333
}
3434
i.Selector = opts.ParsedSelector
3535
catalogContents, err := i.Run(cmd.Context())
3636
if err != nil {
37-
log.Fatalf("failed querying catalog(s): %w", err)
37+
log.Fatalf("failed querying catalog(s): %v", err)
3838
}
3939
switch opts.Output {
4040
case "":

internal/cmd/internal/olmv1/catalog_update.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func NewCatalogUpdateCmd(cfg *action.Configuration) *cobra.Command {
3333
Run: func(cmd *cobra.Command, args []string) {
3434
i.CatalogName = args[0]
3535
if err := opts.validate(); err != nil {
36-
log.Fatalf("failed to parse flags: %w", err)
36+
log.Fatalf("failed to parse flags: %v", err)
3737
}
3838
if cmd.Flags().Changed("priority") {
3939
i.Priority = &opts.Priority
@@ -51,7 +51,7 @@ func NewCatalogUpdateCmd(cfg *action.Configuration) *cobra.Command {
5151
i.Output = opts.Output
5252
catalogObj, err := i.Run(cmd.Context())
5353
if err != nil {
54-
log.Fatalf("failed to update catalog: %w", err)
54+
log.Fatalf("failed to update catalog: %v", err)
5555
}
5656

5757
if len(i.DryRun) == 0 {

internal/cmd/internal/olmv1/extension_delete.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ func NewExtensionDeleteCmd(cfg *action.Configuration) *cobra.Command {
3939
i.ExtensionName = args[0]
4040
}
4141
if err := opts.validate(); err != nil {
42-
log.Fatalf("failed to parse flags: %w", err)
42+
log.Fatalf("failed to parse flags: %v", err)
4343
}
4444
i.DryRun = opts.DryRun
4545
i.Output = opts.Output
4646
extensions, err := i.Run(cmd.Context())
4747
if err != nil {
48-
log.Fatalf("failed to delete extension: %w", err)
48+
log.Fatalf("failed to delete extension: %v", err)
4949
}
5050
if len(i.DryRun) == 0 {
5151
for _, e := range extensions {

internal/cmd/internal/olmv1/extension_get.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ func NewExtensionInstalledGetCmd(cfg *action.Configuration) *cobra.Command {
3030
i.ExtensionName = args[0]
3131
}
3232
if err := opts.validate(); err != nil {
33-
log.Fatalf("failed to parse flags: %w", err)
33+
log.Fatalf("failed to parse flags: %v", err)
3434
}
3535
i.Selector = opts.ParsedSelector
3636
installedExtensions, err := i.Run(cmd.Context())
3737
if err != nil {
38-
log.Fatalf("failed getting installed extension(s): %w", err)
38+
log.Fatalf("failed getting installed extension(s): %v", err)
3939
}
4040

4141
for i := range installedExtensions {

internal/cmd/internal/olmv1/extension_install.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func NewExtensionInstallCmd(cfg *action.Configuration) *cobra.Command {
3535
Run: func(cmd *cobra.Command, args []string) {
3636
i.ExtensionName = args[0]
3737
if err := opts.validate(); err != nil {
38-
log.Fatalf("failed to parse flags: %w", err)
38+
log.Fatalf("failed to parse flags: %v", err)
3939
}
4040
i.Version = opts.Version
4141
i.Channels = opts.Channels
@@ -47,7 +47,7 @@ func NewExtensionInstallCmd(cfg *action.Configuration) *cobra.Command {
4747
i.Output = opts.Output
4848
extObj, err := i.Run(cmd.Context())
4949
if err != nil {
50-
log.Fatalf("failed to install extension %q: %w", i.ExtensionName, err)
50+
log.Fatalf("failed to install extension %q: %v", i.ExtensionName, err)
5151
}
5252
if len(i.DryRun) == 0 {
5353
log.Printf("extension %q created", i.ExtensionName)
@@ -71,13 +71,13 @@ func NewExtensionInstallCmd(cfg *action.Configuration) *cobra.Command {
7171
}
7272

7373
func bindExtensionInstallFlags(fs *pflag.FlagSet, i *v1action.ExtensionInstall) {
74-
fs.StringVarP(&i.Namespace.Name, "namespace", "n", "olmv1-system", "namespace to install the extension in.") //infer?
74+
fs.StringVarP(&i.Namespace.Name, "namespace", "n", "olmv1-system", "namespace to install the extension in.")
7575
fs.StringVarP(&i.PackageName, "package-name", "p", "", "package name of the extension to install. Required.")
7676
fs.StringVarP(&i.ServiceAccount, "service-account", "s", "default", "service account name to use for the extension installation.")
7777
fs.DurationVar(&i.CleanupTimeout, "cleanup-timeout", time.Minute, "the amount of time to wait before cancelling cleanup after a failed creation attempt.")
7878

7979
if err := cobra.MarkFlagRequired(fs, "package-name"); err != nil {
80-
log.Fatalf("failed to process command flags: %w", err)
80+
log.Fatalf("failed to process command flags: %v", err)
8181
}
8282
}
8383

internal/cmd/internal/olmv1/extension_update.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func NewExtensionUpdateCmd(cfg *action.Configuration) *cobra.Command {
3333
Run: func(cmd *cobra.Command, args []string) {
3434
i.ExtensionName = args[0]
3535
if err := opts.validate(); err != nil {
36-
log.Fatalf("failed to parse flags: %w", err)
36+
log.Fatalf("failed to parse flags: %v", err)
3737
}
3838
i.Version = opts.Version
3939
i.Channels = opts.Channels
@@ -46,7 +46,7 @@ func NewExtensionUpdateCmd(cfg *action.Configuration) *cobra.Command {
4646
i.Output = opts.Output
4747
extObj, err := i.Run(cmd.Context())
4848
if err != nil {
49-
log.Fatalf("failed to update extension: %w", err)
49+
log.Fatalf("failed to update extension: %v", err)
5050
}
5151
if len(i.DryRun) == 0 {
5252
log.Printf("extension %q updated", i.ExtensionName)

0 commit comments

Comments
 (0)