Skip to content

Flag Example Incorrect #1615

@gopherbot

Description

@gopherbot

by slash2314:

What steps will reproduce the problem?
1. Try the example at the bottom of the comments at the top of flag.go line 59
2. There is a problem with subcmd := flag.Args(0)


Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
darwin_amd64

Which revision are you using?  (hg identify)
87209dfd5825 tip

Please provide any additional information below.
flag.Args() should not be called with an argument. Shouldn't this be flag.Arg(0)?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions