DRY up the factory methods

use optional functions to set address functions
This commit is contained in:
2026-02-07 14:23:46 +00:00
parent 3c47d12719
commit 23422f9641
11 changed files with 99 additions and 93 deletions

View File

@@ -14,8 +14,8 @@ func newMatrix(c *Client) *Matrix {
return &Matrix{
client: c,
baseAddress: c.addressMap["matrix"],
Eq: newEqForMatrix(c, c.addressMap["matrix"]),
Comp: newCompForMatrix(c, c.addressMap["matrix"]),
Eq: newEq(c, c.addressMap["matrix"]),
Comp: newComp(c, c.addressMap["matrix"]),
}
}