Compare commits

...

4 Commits

Author SHA1 Message Date
hwf452 39fbae8866 Merge branch 'master' of http://43.139.89.198:30000/hwf453/go_mqtt.git 6 days ago
hwf452 7a362b5af3 add full cpu 6 days ago
修改密码漏洞修复完成 26700f9f9e g 4 months ago
修改密码漏洞修复完成 747beb5d6f change db 4 months ago

@ -0,0 +1,17 @@
package main
import "time"
func test_print(a int) {
for {
}
}
func main() {
for i := 0; i < 100; i++ {
go test_print(i)
}
time.Sleep(360000000*time.Second)
}

@ -2,18 +2,21 @@ module go_mqtt
go 1.24.1
require (
github.com/eclipse/paho.mqtt.golang v1.5.0
github.com/go-sql-driver/mysql v1.9.3
github.com/google/uuid v1.6.0
github.com/shopspring/decimal v1.4.0
gorm.io/driver/mysql v1.6.0
gorm.io/gorm v1.30.0
)
require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/eclipse/paho.mqtt.golang v1.5.0 // indirect
github.com/go-sql-driver/mysql v1.9.3 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
golang.org/x/net v0.41.0 // indirect
golang.org/x/sync v0.15.0 // indirect
golang.org/x/text v0.26.0 // indirect
gorm.io/driver/mysql v1.6.0 // indirect
gorm.io/gorm v1.30.0 // indirect
)

@ -20,8 +20,8 @@ func initDatabase() {
//dsn := "root:Skyinno251,@tcp(192.168.2.18:3306)/gorm?charset=utf8mb4&parseTime=True&loc=Local"
//dsn := "root:Skyinno251,@tcp(47.242.184.139:3306)/appserver?charset=utf8mb4&parseTime=True&loc=Local"
//dsn := "root:Skyinno251,@tcp(localhost:3306)/appserver?charset=utf8mb4&parseTime=True&loc=Local"
//dsn := "root:Skyinno251,@tcp(192.168.3.9:3306)/gorm?charset=utf8mb4&parseTime=True&loc=Local"
dsn := "root:Skyinno251,@tcp(localhost:3306)/go_mqtt?charset=utf8mb4&parseTime=True&loc=Local"
dsn := "root:Skyinno251,@tcp(192.168.3.9:3306)/gorm?charset=utf8mb4&parseTime=True&loc=Local"
//dsn := "root:Skyinno251,@tcp(localhost:3306)/go_mqtt?charset=utf8mb4&parseTime=True&loc=Local"
db, err := gorm.Open(mysql.New(mysql.Config{
DSN: dsn, // DSN data source name

Loading…
Cancel
Save