Skip to content

Commit

Permalink
new settings
Browse files Browse the repository at this point in the history
  • Loading branch information
iesreza committed Jul 30, 2024
1 parent a1acb39 commit f344271
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/connectors/nats/nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package nats

import (
"fmt"
"github.com/getevo/evo/v2/lib/settings"
"time"

"github.com/getevo/evo/v2/lib/log"
Expand Down Expand Up @@ -60,7 +61,7 @@ func (NATS) Register() error {
if nc != nil {
return nil
}
settings.Register(
_ = settings.Register(
settings.SettingDomain{
Title: "NATS",
Domain: "NATS",
Expand Down
3 changes: 2 additions & 1 deletion lib/connectors/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/getevo/evo/v2/lib/memo/kv"
"github.com/getevo/evo/v2/lib/pubsub"
"github.com/getevo/evo/v2/lib/serializer"
"github.com/getevo/evo/v2/lib/settings"
"github.com/go-redis/redis/v8"
"strings"
"time"
Expand Down Expand Up @@ -58,7 +59,7 @@ func (driver) Register() error {
if Client != nil {
return nil
}
settings.Register(settings.Setting{
_ = settings.Register(settings.Setting{
Domain: "CACHE",
Name: "REDIS_ADDRESS",
Title: "Redis server(s) address",
Expand Down
3 changes: 2 additions & 1 deletion lib/settings_old/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"github.com/getevo/evo/v2/lib/args"
"github.com/getevo/evo/v2/lib/db"
"github.com/getevo/evo/v2/lib/log"
"github.com/getevo/evo/v2/lib/settings_old"
"strings"
"sync"

Expand Down Expand Up @@ -206,7 +207,7 @@ func (config *Database) Register(sets ...any) error {
for _, s := range sets {
var v = generic.Parse(s)
if v.Is("settings.Setting") {
var setting = settings.Setting{}
var setting = settings_old.Setting{}
var err = v.Cast(&setting)
if err != nil {
return err
Expand Down

0 comments on commit f344271

Please sign in to comment.