From 4e7becee5062b89769e2ae8fad6d8b1e2e85dade Mon Sep 17 00:00:00 2001 From: Shulhan Date: Mon, 11 Sep 2023 00:49:45 +0700 Subject: lib/xmlrpc: add missing comment to exported type and methods --- lib/xmlrpc/response.go | 2 ++ lib/xmlrpc/value.go | 2 +- lib/xmlrpc/xmlrpc.go | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/xmlrpc/response.go b/lib/xmlrpc/response.go index bd127d2e..fcacbe57 100644 --- a/lib/xmlrpc/response.go +++ b/lib/xmlrpc/response.go @@ -12,6 +12,7 @@ import ( liberrors "github.com/shuLhan/share/lib/errors" ) +// Response contains the XML-RPC response. type Response struct { Param *Value @@ -42,6 +43,7 @@ func (resp *Response) MarshalText() (out []byte, err error) { return buf.Bytes(), nil } +// UnmarshalText convert the XML text into Response. func (resp *Response) UnmarshalText(text []byte) (err error) { var ( logp = "xmlrpc: Response" diff --git a/lib/xmlrpc/value.go b/lib/xmlrpc/value.go index b98d48bc..51894573 100644 --- a/lib/xmlrpc/value.go +++ b/lib/xmlrpc/value.go @@ -131,7 +131,7 @@ func (v *Value) GetFieldAsFloat(key string) float64 { return f64 } -// GetFieldAsFloat get the struct's field value by its key as boolean. +// GetFieldAsBoolean get the struct's field value by its key as boolean. func (v *Value) GetFieldAsBoolean(key string) bool { if v == nil || v.StructMembers == nil { return false diff --git a/lib/xmlrpc/xmlrpc.go b/lib/xmlrpc/xmlrpc.go index d441d268..e35ce765 100644 --- a/lib/xmlrpc/xmlrpc.go +++ b/lib/xmlrpc/xmlrpc.go @@ -18,6 +18,7 @@ const ( // defined in XML-RPC. type Kind int +// List of available Kind. const ( Unset Kind = iota String // represent Go string type. -- cgit v1.3-6-g1900