main.go 320 B

12345678910111213141516
  1. package main
  2. import (
  3. "fmt"
  4. "git.nspix.com/golang/rest/v3"
  5. "gorm.io/driver/mysql"
  6. )
  7. func main() {
  8. if err := rest.Init(mysql.New(mysql.Config{
  9. DriverName: "mysql",
  10. DSN: "root:root@tcp(192.168.9.199:3306)/cci?checkConnLiveness=false&maxAllowedPacket=0",
  11. })); err != nil {
  12. fmt.Println(err.Error())
  13. }
  14. }