Golang: response struct having multiple possible types for field

前端 未结 0 393
再見小時候
再見小時候 2020-11-30 08:58

I want to send a response from my api with a unified structure for all responses

type formattedResponse struct {
    Status string
    Data []dataStruct
}

ty         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题