Apply .gitignore rules

This commit is contained in:
皮蛋13361098506
2025-01-06 16:21:36 +08:00
parent 1b77f62820
commit ccd2c530cf
580 changed files with 69806 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
package forbidWordsMgr
import (
"fmt"
"testing"
"time"
)
// type Persion struct {
// name string
// }
// 屏蔽字详细信息
func Test1(t *testing.T) {
//启动获取屏蔽字
refreshForbidWord()
words, pos, exist := SensitiveWords("测试,测试")
if exist {
t.Log(words, pos)
}
t.Log("END")
}
func TestForbidWord(t *testing.T) {
// //启动获取屏蔽字
// refreshForbidWord()
// //判断是否有屏蔽字
// str := "好多花姑凉"
// isExist := IsSensitiveWords(str)
// fmt.Println("是否有敏感字:", isExist)
// //处理屏蔽字
// if isExist {
// newstr := HandleSendsitiveWords(str)
// fmt.Println("newStr:", newstr)
// }
// persionSlice := make([]*Persion, 0, 5)
// //var persionSlice []*Persion
// for i := 0; i < 10; i++ {
// p := &Persion{
// name: "append",
// }
// persionSlice = append(persionSlice, p)
// fmt.Println(&persionSlice)
// }
///fmt.Println(IfServerExists())
StartRefreshForbidWordListTread(27)
time.Sleep(10 * time.Second)
fmt.Println(IsSensitiveWords("g点双享器"))
fmt.Println(IsSensitiveWords("G点双享器"))
time.Sleep(5 * time.Hour)
}

View File

@@ -0,0 +1,32 @@
package user
import (
"common/connection"
)
func init() {
//注册数据库
connection.RegisterDBModel(&User{})
}
type User struct {
ID int64 `gorm:"column:id;primary_key;comment:用户id;autoIncrementIncrement" json:"id"`
//账号
Account string `gorm:"column:account;comment:账号" json:"account"`
Name string `gorm:"column:name;comment:用户名称" json:"name"`
Password string `gorm:"column:password;comment:用户密码" json:"password"`
//性别
Sex int32 `gorm:"column:sex;comment:性别" json:"sex"`
//生日
Birthday string `gorm:"column:birthday;comment:生日" json:"birthday"`
//手机
Phone int64 `gorm:"column:phone;comment:手机" json:"phone"`
//邮箱
Email string `gorm:"column:email;comment:邮箱" json:"email"`
//备注
Describe string `gorm:"column:describe;comment:备注" json:"describe"`
}
func (User) TableName() string {
return "user"
}