1
How could a dynamic return in Go using struct ?
Example :
func teste() (*struct, err){
type t struct {
}
return t, nil
}
The problem is that I would not like to create a struct for each method that needs to return something different. Did not want to return the complete object and wanted it in the best way, would not need to reuse this struct in any place except this, so wanted to leave it within the function.