mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-04-09 02:13:35 +00:00
implement Matrix type
add comp,eq factory methods for Matrix type update address maps
This commit is contained in:
@@ -24,9 +24,7 @@ func newCompForStrip(c *Client) *Comp {
|
||||
return &Comp{
|
||||
client: c,
|
||||
baseAddress: c.addressMap["strip"],
|
||||
AddressFunc: func(fmtString string, args ...any) string {
|
||||
return fmt.Sprintf(fmtString, args...)
|
||||
},
|
||||
AddressFunc: fmt.Sprintf,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,9 +33,16 @@ func newCompForBus(c *Client) *Comp {
|
||||
return &Comp{
|
||||
client: c,
|
||||
baseAddress: c.addressMap["bus"],
|
||||
AddressFunc: func(fmtString string, args ...any) string {
|
||||
return fmt.Sprintf(fmtString, args...)
|
||||
},
|
||||
AddressFunc: fmt.Sprintf,
|
||||
}
|
||||
}
|
||||
|
||||
// Factory function to create Comp instance for Matrix
|
||||
func newCompForMatrix(c *Client) *Comp {
|
||||
return &Comp{
|
||||
client: c,
|
||||
baseAddress: c.addressMap["matrix"],
|
||||
AddressFunc: fmt.Sprintf,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user