Skip to content

Differences from urfave/cli/v2 to v3: DefaultText, cli.StringSlice and quotes #11

Description

@enrichman

While migrating from urfave/cli/v2 to v3 I have found few differences in the generated docs.

DefaultText

I have a cli.StringFlag with a DefaultText (default text of the flag for usage purposes):

&cli.StringFlag{
	Name:        "kubeconfig",
	Usage:       "kubeconfig path",
	Destination: &appCtx.Kubeconfig,
	DefaultText: "$HOME/.kube/config or $KUBECONFIG if set",
}

Is it expected?

Image

cli.StringSlice

Moving from the cli.StringSlice to the []string is adding the empty slice as default:

// v2
**--agent-args**="": agents extra arguments

// v3
**--agent-args**="": agents extra arguments (default: [])

quotes

Quotes for the default strings are missing:

// v2
**--mode**="": k3k mode type (shared, virtual) (default: "shared")

// v3
**--mode**="": k3k mode type (shared, virtual) (default: shared)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions