In Golang, zero values are used in case of an error. Eg, if a key is absent in a map[int]string, an empty string is returned.
I'm writing a function that takes in a url and returns the json string received on making an http request. If the error is not null, I would like to set the return value for the body to be a zero value byte array. Since a byte array can be cast into other data types, I can't figure out what to set it as. Maybe context dependent? Since I expect the returned value to be a string, I should set it to an empty string?