diff --git a/cmd/attach.go b/cmd/attach.go index 064b579f..55c390e7 100644 --- a/cmd/attach.go +++ b/cmd/attach.go @@ -62,7 +62,7 @@ func init() { flags.BoolVar(&attachConfig.Config, "config", false, "turning on this flag will overwrite model artifact config layer") if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache list flags to viper: %w", err)) + panic(fmt.Errorf("bind attach flags to viper: %w", err)) } } diff --git a/cmd/build.go b/cmd/build.go index 25271829..62f655c4 100644 --- a/cmd/build.go +++ b/cmd/build.go @@ -64,7 +64,7 @@ func init() { flags.BoolVar(&buildConfig.NoCreationTime, "no-creation-time", false, "turning on this flag will not set createdAt in the config, which will be helpful for repeated builds") if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache list flags to viper: %w", err)) + panic(fmt.Errorf("bind build flags to viper: %w", err)) } } diff --git a/cmd/extract.go b/cmd/extract.go index f71ef64a..45f60398 100644 --- a/cmd/extract.go +++ b/cmd/extract.go @@ -53,7 +53,7 @@ func init() { flags.IntVar(&extractConfig.Concurrency, "concurrency", extractConfig.Concurrency, "specify the concurrency for extracting the model artifact") if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache extract flags to viper: %w", err)) + panic(fmt.Errorf("bind extract flags to viper: %w", err)) } } diff --git a/cmd/fetch.go b/cmd/fetch.go index f501ba69..c7c44aca 100644 --- a/cmd/fetch.go +++ b/cmd/fetch.go @@ -58,7 +58,7 @@ func init() { flags.StringVar(&fetchConfig.DragonflyEndpoint, "dragonfly-endpoint", "", "specify the dragonfly endpoint for the pull operation, which will download and hardlink the blob by dragonfly GRPC service.") if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache pull flags to viper: %w", err)) + panic(fmt.Errorf("bind fetch flags to viper: %w", err)) } } diff --git a/cmd/inspect.go b/cmd/inspect.go index 3fde9d57..f5519dc7 100644 --- a/cmd/inspect.go +++ b/cmd/inspect.go @@ -52,7 +52,7 @@ func init() { flags.BoolVar(&inspectConfig.Config, "config", false, "inspect the config of the model artifact") if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache inspect flags to viper: %w", err)) + panic(fmt.Errorf("bind inspect flags to viper: %w", err)) } } diff --git a/cmd/list.go b/cmd/list.go index 74c8ae6f..989c34c4 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -47,7 +47,7 @@ func init() { flags := listCmd.Flags() if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache list flags to viper: %w", err)) + panic(fmt.Errorf("bind list flags to viper: %w", err)) } } diff --git a/cmd/login.go b/cmd/login.go index 9e898532..44b4def1 100644 --- a/cmd/login.go +++ b/cmd/login.go @@ -67,7 +67,7 @@ func init() { flags.BoolVar(&loginConfig.Insecure, "insecure", false, "Allow insecure connections to registry") if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache login flags to viper: %w", err)) + panic(fmt.Errorf("bind login flags to viper: %w", err)) } } diff --git a/cmd/logout.go b/cmd/logout.go index 19055d79..b49fc794 100644 --- a/cmd/logout.go +++ b/cmd/logout.go @@ -44,7 +44,7 @@ func init() { flags := logoutCmd.Flags() if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache logout flags to viper: %w", err)) + panic(fmt.Errorf("bind logout flags to viper: %w", err)) } } diff --git a/cmd/modelfile/generate.go b/cmd/modelfile/generate.go index d68a12f5..fbcf931c 100644 --- a/cmd/modelfile/generate.go +++ b/cmd/modelfile/generate.go @@ -119,7 +119,7 @@ func init() { flags.MarkHidden("ignore-unrecognized-file-types") if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache list flags to viper: %w", err)) + panic(fmt.Errorf("bind generate flags to viper: %w", err)) } } diff --git a/cmd/prune.go b/cmd/prune.go index 0004ac3b..08fc9fa3 100644 --- a/cmd/prune.go +++ b/cmd/prune.go @@ -49,7 +49,7 @@ func init() { flags.BoolVar(&pruneConfig.RemoveUntagged, "remove-untagged", true, "remove untagged manifests") if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache rm flags to viper: %w", err)) + panic(fmt.Errorf("bind prune flags to viper: %w", err)) } } diff --git a/cmd/pull.go b/cmd/pull.go index 52904107..bd287120 100644 --- a/cmd/pull.go +++ b/cmd/pull.go @@ -58,7 +58,7 @@ func init() { flags.StringVar(&pullConfig.DragonflyEndpoint, "dragonfly-endpoint", "", "specify the dragonfly endpoint for the pull operation, which will download and hardlink the blob by dragonfly GRPC service, this mode requires extract-from-remote must be true") if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache pull flags to viper: %w", err)) + panic(fmt.Errorf("bind pull flags to viper: %w", err)) } } diff --git a/cmd/push.go b/cmd/push.go index 5fb41c38..e52ce05c 100644 --- a/cmd/push.go +++ b/cmd/push.go @@ -56,7 +56,7 @@ func init() { flags.MarkHidden("nydusify") if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache push flags to viper: %w", err)) + panic(fmt.Errorf("bind push flags to viper: %w", err)) } } diff --git a/cmd/rm.go b/cmd/rm.go index 0f6677d5..841fd360 100644 --- a/cmd/rm.go +++ b/cmd/rm.go @@ -44,7 +44,7 @@ func init() { flags := rmCmd.Flags() if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache rm flags to viper: %w", err)) + panic(fmt.Errorf("bind rm flags to viper: %w", err)) } } diff --git a/cmd/tag.go b/cmd/tag.go index ac8568c2..1e928882 100644 --- a/cmd/tag.go +++ b/cmd/tag.go @@ -44,7 +44,7 @@ func init() { flags := tagCmd.Flags() if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache tag flags to viper: %w", err)) + panic(fmt.Errorf("bind tag flags to viper: %w", err)) } } diff --git a/cmd/upload.go b/cmd/upload.go index 10b50eae..186ccf2d 100644 --- a/cmd/upload.go +++ b/cmd/upload.go @@ -56,7 +56,7 @@ func init() { flags.StringVar(&uploadConfig.DestinationDir, "destination-dir", "", "destination directory for the uploaded file should be specified as a relative path; by default, it will match the original directory of the uploaded file") if err := viper.BindPFlags(flags); err != nil { - panic(fmt.Errorf("bind cache list flags to viper: %w", err)) + panic(fmt.Errorf("bind upload flags to viper: %w", err)) } }