(cmd *cobra.Command)
| 25 | } |
| 26 | |
| 27 | func parseRelocationIfExists(cmd *cobra.Command) (string, error) { |
| 28 | if cmd == nil { |
| 29 | return relocationIfExistsFail, nil |
| 30 | } |
| 31 | ifExists, err := cmd.Flags().GetString("if-exists") |
| 32 | if err != nil { |
| 33 | return relocationIfExistsFail, nil |
| 34 | } |
| 35 | return normalizeRelocationIfExists(ifExists) |
| 36 | } |
| 37 | |
| 38 | func normalizeRelocationIfExists(ifExists string) (string, error) { |
| 39 | switch ifExists { |
no test coverage detected