node_exporter/vendor/github.com/mattn/go-xmlrpc
Ben Kochie e71e9f5a2f
Update vendoring (#1304)
Update to current vendoring.

Signed-off-by: Ben Kochie <superq@gmail.com>
2019-04-15 14:00:19 +02:00
..
.travis.yml Convert to Go modules (#1178) 2018-11-30 14:01:20 +01:00
go.mod Update vendoring (#1304) 2019-04-15 14:00:19 +02:00
LICENSE Fix supervisord collector (#978) 2018-08-06 16:54:46 +02:00
README.md Fix supervisord collector (#978) 2018-08-06 16:54:46 +02:00
xmlrpc.go Update dependency mattn/go-xmlrpc (#1091) 2018-09-30 09:27:14 +02:00

go-xmlrpc

xmlrpc interface for go

Usage

package main

import (
	"github.com/mattn/go-xmlrpc"
	"fmt"
	"log"
)

func main() {
	res, e := xmlrpc.Call(
		"http://your-blog.example.com/xmlrpc.php",
		"metaWeblog.getRecentPosts",
		"blog-id",
		"user-id",
		"password",
		10)
	if e != nil {
		log.Fatal(e)
	}
	for _, p := range res.(xmlrpc.Array) {
		for k, v := range p.(xmlrpc.Struct) {
			fmt.Printf("%s=%v\n", k, v)
		}
		fmt.Println()
	}
}

Installation

$ go get github.com/mattn/go-xmlrpc

License

MIT

Author

Yasuhiro Matsumoto (a.k.a. mattn)