diff --git a/example/multi-mq/mock_ap/main.go b/example/multi-mq/mock_ap/main.go index 0bca70a..404e150 100644 --- a/example/multi-mq/mock_ap/main.go +++ b/example/multi-mq/mock_ap/main.go @@ -11,22 +11,22 @@ import ( func main() { // connect to HPDS-MQ. - source := hpds_node.NewAccessPoint( + ap := hpds_node.NewAccessPoint( "hpds-ap", hpds_node.WithMqAddr("localhost:27188"), hpds_node.WithCredential("token:z1"), ) - err := source.Connect() + err := ap.Connect() if err != nil { log.Printf("[AccessPoint] Emit the data to HPDS-MQ failure with err: %v", err) return } - defer source.Close() + defer ap.Close() - source.SetDataTag(0x33) + ap.SetDataTag(0x33) // generate mock data and send it to HPDS-MQ. - err = generateAndSendData(source) + err = generateAndSendData(ap) if err != nil { log.Printf("[AccessPoint] >>>> ERR >>>> %v", err) os.Exit(1)