From 3022c91eb30f9e1124f8ab08591fb708ddeed8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Wed, 1 Jan 2025 21:15:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20mysql=E5=8C=85=E5=90=AB=E7=89=B9?= =?UTF-8?q?=E6=AE=8A=E5=AD=97=E7=AC=A6=E8=BF=9E=E6=8E=A5=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/db/mysql.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/db/mysql.go b/pkg/db/mysql.go index 180044d8..29de50ea 100644 --- a/pkg/db/mysql.go +++ b/pkg/db/mysql.go @@ -3,7 +3,6 @@ package db import ( "database/sql" "fmt" - "net/url" "regexp" "slices" @@ -20,8 +19,6 @@ type MySQL struct { } func NewMySQL(username, password, address string, typ ...string) (*MySQL, error) { - username = url.QueryEscape(username) - password = url.QueryEscape(password) dsn := fmt.Sprintf("%s:%s@tcp(%s)/", username, password, address) if len(typ) > 0 && typ[0] == "unix" { dsn = fmt.Sprintf("%s:%s@unix(%s)/", username, password, address)