MCPcopy Create free account
hub / github.com/aptly-dev/aptly / SaveConfigRaw

Function SaveConfigRaw

utils/config.go:326–337  ·  view source on GitHub ↗

SaveConfigRaw write configuration to file

(filename string, conf []byte)

Source from the content-addressed store, hash-verified

324
325// SaveConfigRaw write configuration to file
326func SaveConfigRaw(filename string, conf []byte) error {
327 f, err := os.Create(filename)
328 if err != nil {
329 return err
330 }
331 defer func() {
332 _ = f.Close()
333 }()
334
335 _, err = f.Write(conf)
336 return err
337}
338
339// SaveConfigYAML write configuration to yaml file
340func SaveConfigYAML(filename string, config *ConfigStructure) error {

Callers 1

configMethod · 0.92

Calls 2

CloseMethod · 0.65
WriteMethod · 0.65

Tested by

no test coverage detected