Skip to content

Dealing with "redeclared" const/types #549

@jamietanna

Description

@jamietanna

When using Bitly's API generation, i.e.:

oapi-codegen --package=main -include-tags='Bitlinks' -o ./bitly.gen.go [v4.json](https://dev.bitly.com/v4/v4.json)

We receive a number of redeclared consts/types:

./bitly.gen.go:110:2: Both redeclared in this block        ./bitly.gen.go:101:2: other declaration of Both
./bitly.gen.go:112:2: Off redeclared in this block        ./bitly.gen.go:103:2: other declaration of Off
./bitly.gen.go:114:2: On redeclared in this block        ./bitly.gen.go:105:2: other declaration of On
./bitly.gen.go:119:2: Both redeclared in this block        ./bitly.gen.go:101:2: other declaration of Both
./bitly.gen.go:121:2: Off redeclared in this block        ./bitly.gen.go:103:2: other declaration of Off
./bitly.gen.go:123:2: On redeclared in this block        ./bitly.gen.go:105:2: other declaration of On
./bitly.gen.go:128:2: Both redeclared in this block        ./bitly.gen.go:101:2: other declaration of Both
./bitly.gen.go:130:2: Off redeclared in this block        ./bitly.gen.go:103:2: other declaration of Off
./bitly.gen.go:132:2: On redeclared in this block        ./bitly.gen.go:105:2: other declaration of On
./bitly.gen.go:263:6: Clicks redeclared in this block        ./bitly.gen.go:144:2: other declaration of Clicks
./bitly.gen.go:263:6: too many errors

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