(v reflect.Value, headers []string)
| 441 | } |
| 442 | |
| 443 | func getMapValues(v reflect.Value, headers []string) []string { |
| 444 | values := make([]string, 0, len(headers)) |
| 445 | for _, header := range headers { |
| 446 | value := v.MapIndex(reflect.ValueOf(header)) |
| 447 | if value.IsValid() { |
| 448 | values = append(values, fmt.Sprintf("%v", value.Interface())) |
| 449 | continue |
| 450 | } |
| 451 | values = append(values, "") |
| 452 | } |
| 453 | return values |
| 454 | } |
| 455 | |
| 456 | func normalizeFormat(format string) Format { |
| 457 | switch strings.ToLower(strings.TrimSpace(format)) { |