package spider import ( "go-wordpress-xmlrpc/wordpress" "log" ) func saveBlog(title string, content string, postDate string, tags []string, catelogs []string) { c, err := NewClient(`http://49.235.160.131/xmlrpc.php`, UserInfo{ //c, err := NewClient(`https://www.aispider.cc/xmlrpc.php`, UserInfo{ `你的账户`, `你的密码`, }) if err != nil { log.Fatalln(err) } p := wordpress.NewPost(title, content, postDate, tags, catelogs) blogID, err := c.Call(p) if err != nil { log.Println(err) } log.Println(blogID) }