2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 13:47:15 +08:00

feat: 初步完成redis操作方法

This commit is contained in:
耗子
2024-11-11 02:22:23 +08:00
parent 5fba45e3a4
commit 6f0f4c69ef
9 changed files with 365 additions and 10 deletions

View File

@@ -21,7 +21,7 @@ type Postgres struct {
port uint
}
func NewPostgres(username, password, address, hbaFile string, port uint) (*Postgres, error) {
func NewPostgres(username, password, address string, port uint, hbaFile string) (*Postgres, error) {
dsn := fmt.Sprintf("host=%s port=%d user=%s password=%s dbname=postgres sslmode=disable", address, port, username, password)
if password == "" {
dsn = fmt.Sprintf("host=%s port=%d user=%s dbname=postgres sslmode=disable", address, port, username)