MCPcopy
hub / github.com/gdy666/lucky / Save

Function Save

config/config.go:271–289  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

269}
270
271func Save() (err error) {
272 //log.Printf("Save配置\n")
273 if configureFileSign == 0 {
274 return fmt.Errorf("配置文件不存在,不作保存")
275 }
276 defer func() {
277 checkConfigureFileOnce.Do(func() {
278 if err == nil {
279 configureFileSign = 1
280 } else {
281 configureFileSign = 0
282 }
283 })
284
285 }()
286
287 err = saveProgramConfig(programConfigure, configurePath)
288 return
289}
290
291//------------------------------------------------------------------------------------
292

Callers 15

mainFunction · 0.92
PortForwardsRuleListAddFunction · 0.92
SetPortForwardsConfigureFunction · 0.92
ReverseProxyRuleListAddFunction · 0.92
UpdateReverseProxyRuletFunction · 0.92

Calls 1

saveProgramConfigFunction · 0.85

Tested by

no test coverage detected