diff options
| author | Shulhan <ms@kilabit.info> | 2022-03-21 12:50:00 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-03-21 12:50:00 +0700 |
| commit | 67ff9a046ef5b38cb15e240811cd7c6c1126ffcc (patch) | |
| tree | 465c6ace69df5ea150075b1dbc34f774995dffd3 | |
| parent | 707e43921181505f252f94fff53aada17dfd4f95 (diff) | |
| download | pakakeh.go-67ff9a046ef5b38cb15e240811cd7c6c1126ffcc.tar.xz | |
lib/xmlrpc: use %v to convert non-string type on GetFieldAsString
Previously, if GetFieldAsString is called and the struct field type is
not string, it will return "%s(<type>=<value>)" instead of the value
in string.
This commit fix this issue by using %v to convert non-string type.
| -rw-r--r-- | lib/xmlrpc/value.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xmlrpc/value.go b/lib/xmlrpc/value.go index ec2f42a0..99921014 100644 --- a/lib/xmlrpc/value.go +++ b/lib/xmlrpc/value.go @@ -167,7 +167,7 @@ func (v *Value) GetFieldAsString(key string) string { } s, ok := mv.In.(string) if !ok { - return fmt.Sprintf("%s", mv.In) + return fmt.Sprintf("%v", mv.In) } return s } |
