Couldn't this be replaced with
```
err = fmt.Errorf("Message of zero length")
return
```
?