Skip to content

Commit

Permalink
pubsub fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iesreza committed Dec 6, 2023
1 parent e21880e commit 1432241
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions lib/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/getevo/evo/v2/lib/settings/yml"
)

var drivers = []Interface{&yml.Yaml{}}
var defaultDriver Interface = &yml.Yaml{}
var drivers []Interface
var defaultDriver Interface

type Interface interface {
Name() string // Name returns driver name
Expand Down Expand Up @@ -84,9 +84,9 @@ func AddDriver(driver Interface) {
if err != nil {
log.Fatal("unable to initiate config driver", "name", driver.Name(), "error", err)
}
}
if defaultDriver == nil {
defaultDriver = driver
if defaultDriver == nil {
defaultDriver = driver
}
}
}

Expand All @@ -112,21 +112,6 @@ func SetMulti(data map[string]any) error {

func Register(settings ...any) {
defaultDriver.Register(settings...)
/* var key = ""
for idx, _ := range settings {
var v = generic.Parse(settings[idx])
if v.Is("string") {
key = v.String()
continue
}
if v.Is("settings.SettingDomain") || v.Is("settings.Setting") {
continue
}
c := Get(key)
if !c.IsEmpty() && !c.IsNil() {
c.Cast(v)
}
}*/
}

func Init(params ...string) error {
Expand Down

0 comments on commit 1432241

Please sign in to comment.