Avoid decoding into pointer to pointer
This commit is contained in:
parent
057c49bccc
commit
e09fd3cf51
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue