package mysqlx import ( "fmt" "testing" ) func TestGetDsn(t *testing.T) { var str = `root:qq123123@tcp(127.0.0.1:3306)/sikey?charset=utf8mb4&parseTime=true&loc=Local` dsn := withDsn(str) fmt.Println(dsn) }