Skip to content

False-positive for anonymous functions #17

Description

@r2k1

Wrapcheck throws an error for the next case:

import "errors"

func Test_AnonFunc(t *testing.T) {
	test := func() error {
		return errors.New("test")
	}
	fmt.Println(test())
}

error returned from external package is unwrapped: sig: func errors.New(text string) error

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions