MCPcopy Index your code
hub / github.com/celer-pkg/celer / SetPlatform

Method SetPlatform

configs/celer_update.go:129–146  ·  view source on GitHub ↗
(platformName string)

Source from the content-addressed store, hash-verified

127}
128
129func (c *Celer) SetPlatform(platformName string) error {
130 if err := c.readOrCreate(); err != nil {
131 return err
132 }
133
134 // Init and setup.
135 if err := c.platform.Init(platformName); err != nil {
136 return err
137 }
138 c.Main.Platform = platformName
139 c.platform.Name = platformName
140
141 if err := c.save(); err != nil {
142 return err
143 }
144
145 return nil
146}
147
148func (c *Celer) SetProject(projectName string) error {
149 if err := c.readOrCreate(); err != nil {

Calls 3

readOrCreateMethod · 0.95
saveMethod · 0.95
InitMethod · 0.65