Skip to content

Switch flag definitions to be on pflag instead of flag in package go/internal/flag #11297

Closed
@ajm188

Description

@ajm188

Part of #10697.

Current flags:

$ git grep -E "\bflag\.[A-Z]" -- go/internal/flag/*.go
go/internal/flag/flag.go:// Parse wraps the standard library's flag.Parse to perform some sanity checking
go/internal/flag/flag.go:func Parse(fs *flag.FlagSet) {
go/internal/flag/flag.go:       flag.CommandLine = fs
go/internal/flag/flag.go:       flag.Parse()
go/internal/flag/flag.go:       flag.Usage()
go/internal/flag/flag.go:       fs := flag.NewFlagSet("test", flag.ExitOnError)
go/internal/flag/flag.go:       return goflag.Parsed() || flag.Parsed()
go/internal/flag/flag.go:func Lookup(name string) *flag.Flag {
go/internal/flag/flag.go:       if f := flag.Lookup(name); f != nil {
go/internal/flag/flag.go:               return flag.PFlagFromGoFlag(f)
go/internal/flag/flag.go:// equivalent to flag.Args() from the standard library flag package.
go/internal/flag/flag.go:       for i, arg := range flag.Args() {
go/internal/flag/flag.go:               args = append(args, flag.Args()[doubleDashIdx+1:]...)
go/internal/flag/flag.go:// specified, this is equivalent to flag.Arg(i) from the standard library flag
go/internal/flag/usage.go:                      //      >       flag.String("I", "", "search `directory` for include files")

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions