mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-04-09 02:13:35 +00:00
DRY up the factory methods
use optional functions to set address functions
This commit is contained in:
@@ -10,13 +10,14 @@ type Strip struct {
|
||||
Comp *Comp
|
||||
}
|
||||
|
||||
// newStrip creates a new Strip instance
|
||||
func newStrip(c *Client) *Strip {
|
||||
return &Strip{
|
||||
client: c,
|
||||
baseAddress: c.addressMap["strip"],
|
||||
Gate: newGateForStrip(c, c.addressMap["strip"]),
|
||||
Eq: newEqForStrip(c, c.addressMap["strip"]),
|
||||
Comp: newCompForStrip(c, c.addressMap["strip"]),
|
||||
Gate: newGate(c, c.addressMap["strip"]),
|
||||
Eq: newEq(c, c.addressMap["strip"]),
|
||||
Comp: newComp(c, c.addressMap["strip"]),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user