If you do care about performance, you probably do not want to copy trimmed[i] to `r` , then trim `r` , and finally copy the result back.
This should be more efficient. 
```go
for i:=0; i<len(trimmed); i++{
    trimmed[i] = strings.TrimSpace(trimmed[i])
}
```