Thanks to visit codestin.com
Credit goes to github.com

Skip to content

interface conversion: interface {} is nil, not map[string]interface {} #51

@NOMORECOFFEE

Description

@NOMORECOFFEE

transport.NewCompoundServiceDesc().SwaggerDef()
return:
{"definitions":null,"paths":null}
expect:
{"definitions":{},"paths":{}}
or not panic in example

s1 := transport.NewCompoundServiceDesc()
s2 := transport.NewCompoundServiceDesc(s1)

s2.SwaggerDef() // <-- panic

I think you shouldn't call type cast before nil check
https://github.com/utrack/clay/blob/master/transport/swagcombo.go#L30-L36

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions