(ifExists string)
| 36 | } |
| 37 | |
| 38 | func normalizeRelocationIfExists(ifExists string) (string, error) { |
| 39 | switch ifExists { |
| 40 | case "", relocationIfExistsFail: |
| 41 | return relocationIfExistsFail, nil |
| 42 | case relocationIfExistsSkip: |
| 43 | return relocationIfExistsSkip, nil |
| 44 | default: |
| 45 | return "", invalidArgumentsErrorfWithDetails("invalid --if-exists %q (use fail or skip)", flagValueErrorDetails("if-exists", ifExists), ifExists) |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | func relocationSkipIfDestinationExists(dbx filesClient, arg *files.RelocationArg, opts relocationOptions) (relocationResult, bool, error) { |
| 50 | if opts.ifExists != relocationIfExistsSkip { |
no test coverage detected