(features []string)
| 415 | } |
| 416 | |
| 417 | func rsyncFeatureArgs(features []string) []string { |
| 418 | args := []string{} |
| 419 | if slices.Contains(features, "xattrs") { |
| 420 | args = append(args, "--xattrs", "--filter=-x security.selinux") |
| 421 | } |
| 422 | |
| 423 | if slices.Contains(features, "delete") { |
| 424 | args = append(args, "--delete") |
| 425 | } |
| 426 | |
| 427 | if slices.Contains(features, "compress") { |
| 428 | args = append(args, "--compress") |
| 429 | args = append(args, "--compress-level=2") |
| 430 | } |
| 431 | |
| 432 | return args |
| 433 | } |