Skip to content

SortFlags not exported #382

Description

@plungingChode

The SortFlags option mentioned in the README is not actually exported.

pflag/README.md

Line 257 in d5e0c06

flags.SortFlags = false

Instead CommandLine.SortFlags is available.

# README.md
flags.BoolP("verbose", "v", false, "verbose output")
flags.String("coolflag", "yeaah", "it's really cool flag")
flags.Int("usefulflag", 777, "sometimes it's very useful")
-flags.SortFlags = false
+flags.CommandLine.SortFlags = false
flags.PrintDefaults()

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions