这是indexloc提供的服务,不要输入任何密码
Skip to content

empty array will be send out as null #457

@ScriptType

Description

@ScriptType

i have following type which im returning.
type InstanceArrayResponse struct {
Body []*InstanceBody
}

if the Body is now an empty array i get null as a response when testing the api.

fmt.Println(instancesResponse) //&{[]}

so &{[]} is what i`m returning in the handler but in the frontend i receive null :/

When the array is Filled with values its working as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions