Skip to content
This repository was archived by the owner on Apr 11, 2025. It is now read-only.
This repository was archived by the owner on Apr 11, 2025. It is now read-only.

duplicate argument error #42

Description

I'm getting a 'duplicate argument name' with the below code

func location(name, city string) (name, continent string) {
    switch city {
    case "New York", "LA", "Chicago":
        continent = "North America"
    default:
        continent = "Unknown"
    }
    return
}

func main() {
    name, continent := location("Matt", "LA")
    fmt.Printf("%s lives in %s", name, continent)
}
go version go1.4.2 darwin/amd64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions