Avoid decoding into pointer to pointer

This commit is contained in:
andig 2022-03-05 10:12:31 +01:00
parent 057c49bccc
commit e09fd3cf51
2 changed files with 2 additions and 2 deletions

View file

@ -155,7 +155,7 @@ type LoadPoint struct {
// NewLoadPointFromConfig creates a new loadpoint
func NewLoadPointFromConfig(log *util.Logger, cp configProvider, other map[string]interface{}) (*LoadPoint, error) {
lp := NewLoadPoint(log)
if err := util.DecodeOther(other, &lp); err != nil {
if err := util.DecodeOther(other, lp); err != nil {
return nil, err
}

View file

@ -72,7 +72,7 @@ func NewSiteFromConfig(
tariffs tariff.Tariffs,
) (*Site, error) {
site := NewSite()
if err := util.DecodeOther(other, &site); err != nil {
if err := util.DecodeOther(other, site); err != nil {
return nil, err
}