You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
532 B
Go

3 years ago
/**
* @Author: jager
* @Email: lhj168os@gmail.com
* @File: msg_test
* @Date: 2021/12/17 5:56
* @package: msg
* @Version: v1.0.0
*
* @Description:
*
*/
package msg
import (
3 years ago
xml2 "encoding/xml"
"fmt"
3 years ago
"testing"
3 years ago
"time"
3 years ago
)
func Test_Post(t *testing.T) {
3 years ago
wMsg := &xml{
ToUserName: "rMsg.FromUserName",
FromUserName: "rMsg.ToUserName",
CreateTime: int(time.Now().Unix()),
MsgType: "text",
Content: "收到,谢谢!",
}
bty, _ := xml2.Marshal(wMsg)
fmt.Println(string(bty))
3 years ago
}