()
| 15 | ) |
| 16 | |
| 17 | func Init() { |
| 18 | settingRepo := repo.NewISettingRepo() |
| 19 | global.CONF.Conn.Port, _ = settingRepo.GetValueByKey("ServerPort") |
| 20 | global.CONF.Conn.Ipv6, _ = settingRepo.GetValueByKey("Ipv6") |
| 21 | global.CONF.Base.Edition, _ = settingRepo.GetValueByKey("Edition") |
| 22 | global.CONF.Conn.BindAddress, _ = settingRepo.GetValueByKey("BindAddress") |
| 23 | global.CONF.Conn.SSL, _ = settingRepo.GetValueByKey("SSL") |
| 24 | global.CONF.Base.Version, _ = settingRepo.GetValueByKey("SystemVersion") |
| 25 | if err := settingRepo.Update("SystemStatus", "Free"); err != nil { |
| 26 | global.LOG.Fatalf("init service before start failed, err: %v", err) |
| 27 | } |
| 28 | |
| 29 | handleUserInfo(global.CONF.Base.ChangeUserInfo, settingRepo) |
| 30 | |
| 31 | generateKey() |
| 32 | initDockerConf() |
| 33 | } |
| 34 | |
| 35 | func handleUserInfo(tags string, settingRepo repo.ISettingRepo) { |
| 36 | if len(tags) == 0 { |
nothing calls this directly
no test coverage detected