(cmd *cobra.Command)
| 86 | } |
| 87 | |
| 88 | func parseShareLinkInfoOptions(cmd *cobra.Command) (shareLinkInfoOptions, error) { |
| 89 | var opts shareLinkInfoOptions |
| 90 | |
| 91 | if localFlagChanged(cmd, "path") { |
| 92 | path, err := localStringFlag(cmd, "path") |
| 93 | if err != nil { |
| 94 | return opts, err |
| 95 | } |
| 96 | if path == "" { |
| 97 | return opts, invalidArgumentsErrorWithDetails("`--path` requires a non-empty path", flagErrorDetails("path")) |
| 98 | } |
| 99 | opts.path = path |
| 100 | } |
| 101 | |
| 102 | password, err := sharedLinkPasswordFromFlags(cmd) |
| 103 | if err != nil { |
| 104 | return opts, err |
| 105 | } |
| 106 | opts.password = password |
| 107 | |
| 108 | return opts, nil |
| 109 | } |
| 110 | |
| 111 | func renderSharedLinkInfo(out io.Writer, link sharing.IsSharedLinkMetadata) error { |
| 112 | metadata, linkType, ok := sharedLinkBaseMetadata(link) |
no test coverage detected