MCPcopy
hub / github.com/kopia/kopia / getParameters

Method getParameters

cli/command_blob_shards_modify.go:45–58  ·  view source on GitHub ↗
(dotShardsFile string)

Source from the content-addressed store, hash-verified

43}
44
45func (c *commandBlobShardsModify) getParameters(dotShardsFile string) (*sharded.Parameters, error) {
46 //nolint:gosec
47 f, err := os.Open(dotShardsFile)
48 if err != nil {
49 return nil, errors.Wrap(err, "unable to open shards file")
50 }
51
52 p := &sharded.Parameters{}
53 if err := p.Load(f); err != nil {
54 return nil, errors.Wrap(err, "error loading parameters")
55 }
56
57 return p, nil
58}
59
60func parseShardSpec(shards string) ([]int, error) {
61 result := []int{}

Callers 1

runMethod · 0.95

Calls 2

LoadMethod · 0.95
OpenMethod · 0.65

Tested by

no test coverage detected