MCPcopy
hub / github.com/syncthing/syncthing / GetConfig

Method GetConfig

lib/rc/rc.go:273–282  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

271}
272
273func (p *Process) GetConfig() (config.Configuration, error) {
274 var cfg config.Configuration
275 bs, err := p.Get("/rest/system/config")
276 if err != nil {
277 return cfg, err
278 }
279
280 err = json.Unmarshal(bs, &cfg)
281 return cfg, err
282}
283
284func (p *Process) PostConfig(cfg config.Configuration) error {
285 buf := new(bytes.Buffer)

Callers 1

Calls 2

GetMethod · 0.95
UnmarshalMethod · 0.45

Tested by 1