INNER CODE UNIT · Go
func
kitops-ml/kitops · pkg/cmd/inspect/cmd.go:109
func (opts *inspectOptions) complete(ctx context.Context, args []string) error {
configHome, ok := ctx.Value(constants.ConfigKey{}).(string)
if !ok {
return fmt.Errorf("default config path not set on command context")
}
opts.configHome = configHome
ref, extraTags, err := artifact.ParseReference(args[0])
if err != nil {
return err
}
if len(extraTags) > 0 {
return fmt.Errorf("invalid reference format: extra tags are not supported: %s", strings.Join(extraTags, ", "))
}
if ref.Reference == "" {
return fmt.Errorf("missing tag or digest from ModelKit reference '%s'", args[0])
}
opts.modelRef = ref