修改客户端分配的ip为CIDR格式,请注意原来network格式

This commit is contained in:
bjd
2021-02-04 13:32:10 +08:00
parent 1c6572f5e3
commit edb0fe2dc9
32 changed files with 155 additions and 139 deletions

View File

@@ -43,28 +43,27 @@ func initData() {
return
}
defer Set(SettingBucket, Installed, true)
defer func() {
_ = Set(SettingBucket, Installed, true)
}()
smtp := &SettingSmtp{
Host: "127.0.0.1",
Port: 25,
From: "vpn@xx.com",
}
SettingSet(smtp)
_ = SettingSet(smtp)
other := &SettingOther{
Banner: "您已接入公司网络,请按照公司规定使用。\n请勿进行非工作下载及视频行为",
AccountMail: accountMail,
}
SettingSet(other)
_ = SettingSet(other)
}
func CheckErrNotFound(err error) bool {
if err == storm.ErrNotFound {
return true
}
return false
return err == storm.ErrNotFound
}
const accountMail = `<p>您好:</p>

View File

@@ -27,7 +27,7 @@ func TestDb(t *testing.T) {
defer closeIpdata()
u := User{Username: "a"}
Save(&u)
_ = Save(&u)
assert.Equal(u.Id, 1)
}