package NatsServer import ( "Cold_Api/controllers/lib" "github.com/beego/beego/v2/core/logs" "Cold_Api/models/Product" "github.com/vmihailenco/msgpack/v5" ) func Up_ProductUpgrade(T_sn, T_version, T_file, T_mqttid string) { t_Req := Product.ProductUpgrade_T{ T_sn: T_sn, T_version: T_version, T_file: T_file, } b, _ := msgpack.Marshal(&t_Req) err := lib.Nats.Publish("Up_ProductUpgrade"+T_mqttid, b) if err != nil { logs.Info("Nats =>", lib.FuncName(), err) } }