(ctx context.Context, isCreate bool, formatVersion int)
| 29 | } |
| 30 | |
| 31 | func (c *storageWebDAVFlags) Connect(ctx context.Context, isCreate bool, formatVersion int) (blob.Storage, error) { |
| 32 | wo := c.options |
| 33 | |
| 34 | if wo.Username != "" && wo.Password == "" { |
| 35 | pass, err := askPass(os.Stdout, "Enter WebDAV password: ") |
| 36 | if err != nil { |
| 37 | return nil, err |
| 38 | } |
| 39 | |
| 40 | wo.Password = pass |
| 41 | } |
| 42 | |
| 43 | wo.DirectoryShards = initialDirectoryShards(c.connectFlat, formatVersion) |
| 44 | |
| 45 | //nolint:wrapcheck |
| 46 | return webdav.New(ctx, &wo, isCreate) |
| 47 | } |
| 48 | |
| 49 | func init() { |
| 50 | mustRegisterStorageProvider( |
nothing calls this directly
no test coverage detected