XMLRPC Go library is designed to make it easy to create an XMLRPC client, making method calls and receiving method responses.
The library is compliant with the XML-RPC specification published by http://www.xmlrpc.org/.
- Go 1.9 or newer to compile
- Go dep tool to manage dependencies
- gometalinter tool to run Go lint tools and normalise their output
The recommended way to install this library is using go get
:
go get -u github.com/onego-project/xmlrpc
Short usage example expects xml-rpc server running at localhost:8000
with method pow
which takes 2 integers and returns one int value.
package main
import (
"github.com/onego-project/xmlrpc"
"context"
"fmt"
)
func main() {
client := xmlrpc.NewClient("http://localhost:8000/")
ctx := context.TODO()
result, err := client.Call(ctx, "pow", 3, 4)
if err != nil {
fmt.Printf("Error: %s\n", err)
return
}
fmt.Println("Result kind:", result.Kind())
fmt.Println("Result:", result.ResultInt())
}
- Fork xmlrpc library
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request