Skip to content

Add quickfix to add default zero values to returns #2077

@dlsniper

Description

@dlsniper

There's a tool called goreturns, https://github.com/sqs/goreturns, which allows a code like this:

func F() (*MyType, int, error) {
    return errors.New("foo")
}

to become this:

func F() (*MyType, int, error) {
    return nil, 0, errors.New("foo")
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions