function 'GetVolumeWithSize' seems to be a getter but it does not return any result
351 }
352}
353
354func (vs *VolumeServer) GetVolumeWithSize(w http.ResponseWriter, req *http.Request) {355 w.Header().Set("Content-Type", "application/json")
356
357 handle := rata.Param(req, "handle")
Description
Typically, functions with names prefixed with Get are supposed to return a value.
Bad practice
func GetData(n int) {
fmt.Println(10 - n)
}
Recommended
func GetData(n int) int {
fmt.Println(10 - n)
return 10 - n
}