diff --git a/app/pkg/config/config.go b/app/pkg/config/config.go index 2a299f4..69a4e6f 100644 --- a/app/pkg/config/config.go +++ b/app/pkg/config/config.go @@ -1,7 +1,6 @@ package config import ( - "encoding/json" "fmt" "github.com/fthvgb1/wp-go/safety" "gopkg.in/yaml.v2" @@ -112,20 +111,6 @@ func InitConfig(conf string) error { return nil } -func jsonToYaml[T any](b []byte, c T) error { - var v map[string]any - err := json.Unmarshal(b, &v) - if err != nil { - return err - } - marshal, er := yaml.Marshal(v) - if er != nil { - return er - } - err = yaml.Unmarshal(marshal, c) - return err -} - type Dsn struct { Host string `yaml:"host" json:"host,omitempty"` Port string `yaml:"port" json:"port,omitempty"`