MCPcopy Create free account
hub / github.com/celer-pkg/celer / SetDownloads

Method SetDownloads

configs/celer_update.go:95–110  ·  view source on GitHub ↗
(downloads string)

Source from the content-addressed store, hash-verified

93}
94
95func (c *Celer) SetDownloads(downloads string) error {
96 if !fileio.PathExists(downloads) {
97 return fmt.Errorf("downloads dir to configure is not exist for %s", downloads)
98 }
99
100 if err := c.readOrCreate(); err != nil {
101 return err
102 }
103
104 c.Main.Downloads = downloads
105 if err := c.save(); err != nil {
106 return err
107 }
108
109 return nil
110}
111
112func (c *Celer) SetJobs(jobs int) error {
113 if jobs <= 0 {

Callers 1

configureMainMethod · 0.80

Calls 3

readOrCreateMethod · 0.95
saveMethod · 0.95
PathExistsFunction · 0.92

Tested by

no test coverage detected