chore: fix code style

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
Jianhui Zhao
2022-04-12 17:24:17 +08:00
parent 4a55679095
commit 03b976a9d1
+4 -4
View File
@@ -2,23 +2,23 @@
* @Author: 周家建
* @Mail: zhou_0611@163.com
* @Date: 2021-07-27 19:02:39
* @Description:
* @Description:
*/
package main
import (
"strings"
"database/sql"
_ "github.com/go-sql-driver/mysql"
_ "github.com/mattn/go-sqlite3"
"strings"
)
func instanceDB(str string) (*sql.DB, error) {
sp:= strings.Split(str, "://")
sp := strings.Split(str, "://")
if len(sp) == 2 {
return sql.Open(sp[0], sp[1])
} else {
return sql.Open("mysql", str)
}
}
}