Use strings.TrimSpace() instead of strings.Trim().