MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / storeDSN

Function storeDSN

cmd/cql/internal/cfg.go:202–210  ·  view source on GitHub ↗
(dsnArray []string)

Source from the content-addressed store, hash-verified

200}
201
202func storeDSN(dsnArray []string) {
203 dsnFilePath := path.Join(conf.GConf.WorkingRoot, ".dsn")
204 dsns := strings.Join(dsnArray, "\n")
205 err := ioutil.WriteFile(dsnFilePath, []byte(dsns), 0644)
206 if err != nil {
207 ConsoleLog.WithError(err).Error("store dsn file failed")
208 return
209 }
210}
211
212func loadDSN() []string {
213 dsnFilePath := path.Join(conf.GConf.WorkingRoot, ".dsn")

Callers 1

storeOneDSNFunction · 0.85

Calls 2

ErrorMethod · 0.80
WithErrorMethod · 0.80

Tested by

no test coverage detected