stay code :P

This commit is contained in:
pigwin
2025-02-08 14:48:20 +00:00
parent 8c0bd734c6
commit 6632c38c0c
7 changed files with 39 additions and 12 deletions

View File

@@ -17,7 +17,7 @@ type ValkeyConfig struct {
Port string `json:"port"`
MaxConns int `json:"max_conns"`
TimeoutMs int `json:"timeout_ms"`
Password string `json:"password"` // Add this line
Password string `json:"password"`
}
func LoadValkeyConfig(file string) (ValkeyConfig, error) {
@@ -56,9 +56,9 @@ func LoadValkeyConfig(file string) (ValkeyConfig, error) {
return config, nil
}
func ConnectToValkey(configPath string) (valkey.Client, error) {
func ConnectToValkey() (valkey.Client, error) {
fmt.Println("Loading configuration...")
config, err := LoadConfig(configPath)
config, err := LoadConfig()
if err != nil {
return nil, fmt.Errorf("failed to load config: %v", err)
}