MCPcopy Index your code
hub / github.com/kopia/kopia / Connect

Method Connect

cli/storage_webdav.go:31–47  ·  view source on GitHub ↗
(ctx context.Context, isCreate bool, formatVersion int)

Source from the content-addressed store, hash-verified

29}
30
31func (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
49func init() {
50 mustRegisterStorageProvider(

Callers

nothing calls this directly

Calls 3

NewFunction · 0.92
askPassFunction · 0.85
initialDirectoryShardsFunction · 0.85

Tested by

no test coverage detected