mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-10 23:53:29 +08:00
修改客户端分配的ip为CIDR格式,请注意原来network格式
This commit is contained in:
13
dbdata/db.go
13
dbdata/db.go
@@ -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>
|
||||
|
@@ -27,7 +27,7 @@ func TestDb(t *testing.T) {
|
||||
defer closeIpdata()
|
||||
|
||||
u := User{Username: "a"}
|
||||
Save(&u)
|
||||
_ = Save(&u)
|
||||
|
||||
assert.Equal(u.Id, 1)
|
||||
}
|
||||
|
Reference in New Issue
Block a user