Remove unnecessarily named return variables

Named return variables should only be used to describe the returned type
further, e.g. `err error` doesn't add any new information and is just
stutter.
This commit is contained in:
Tobias Schmidt 2017-02-28 14:47:20 -04:00
commit 922e74d58f
32 changed files with 54 additions and 56 deletions

View file

@ -20,7 +20,8 @@ import (
"strings"
)
func splitToInts(str string, sep string) (ints []int, err error) {
func splitToInts(str, sep string) ([]int, error) {
var ints []int
for _, part := range strings.Split(str, sep) {
i, err := strconv.Atoi(part)
if err != nil {