Skip to content

httprouter.go Need Type Assertion #292

Closed
@Linuturk

Description

@Linuturk

Hey guys,

Not sure why I'm getting this error when I attempt to build with api2go:

github.com/manyminds/api2go/routing/httprouter.go:51: cannot use notAllowedHandler (type http.Handler) as type http.HandlerFunc in assignment: need type assertion

Seems to be this line here: https://github.com/manyminds/api2go/blob/master/routing/httprouter.go#L51

If I comment this out everything seems to validate fine. Given the code in that section is from two years ago, I imagine there's just a small tweak that needs to be made?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions