()
| 210 | } |
| 211 | |
| 212 | func loadDSN() []string { |
| 213 | dsnFilePath := path.Join(conf.GConf.WorkingRoot, ".dsn") |
| 214 | dsns, err := ioutil.ReadFile(dsnFilePath) |
| 215 | if err != nil { |
| 216 | if !os.IsNotExist(err) { |
| 217 | ConsoleLog.WithError(err).Error("load dsn file failed") |
| 218 | } |
| 219 | return nil |
| 220 | } |
| 221 | return strings.Split(string(dsns), "\n") |
| 222 | } |
| 223 | |
| 224 | func storeOneDSN(dsn string) { |
| 225 | dsnArray := loadDSN() |
no test coverage detected