We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please answer these questions before submitting your issue. Thanks!
go version
1.8
go env
linux 64
test code:
package main import ( "encoding/xml" "fmt" "strings" ) var xmlData = ` <node> <interface name="org.freedesktop.NetworkManager.Device.Gre"> <signal name="Changed"> <arg name="changed" type="s"></arg> </signal> <signal name="PropertiesChanged"> <arg name="properties" type="a{sv}" tp:type="String_Variant_Map"> <tp:docstring> A dictionary mapping property names to variant boxed values </tp:docstring> </arg> </signal> </interface> </node> ` type NodeInfo struct { Interface struct { Signals []SignalInfo `xml:"signal"` } `xml:"interface"` } type SignalInfo struct { Name string `xml:"name,attr"` Arg ArgInfo `xml:"arg"` } type ArgInfo struct { Name string `xml:"name,attr"` Type string `xml:"type,attr"` } func main() { reader := strings.NewReader(xmlData) decoder := xml.NewDecoder(reader) var info NodeInfo err := decoder.Decode(&info) if err != nil { fmt.Println("Failed to decode:", err) return } for _, signal := range info.Interface.Signals { fmt.Println("Signal:", signal.Name) fmt.Printf("\tName: %s\n\tType: %s\n", signal.Arg.Name, signal.Arg.Type) } }
I expected the signal PropertiesChanged 's type to a{sv}, but the result was String_Variant_Map.
PropertiesChanged
type
a{sv}
String_Variant_Map
I expected the signal PropertiesChanged 's type to a{sv}
but the result was String_Variant_Map
The text was updated successfully, but these errors were encountered:
Duplicate of section 4 on #14407 and, more specifically, of #8535; let's track this there. Thanks!
Sorry, something went wrong.
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.8
What operating system and processor architecture are you using (
go env
)?linux 64
What did you do?
test code:
I expected the signal
PropertiesChanged
'stype
toa{sv}
, but the result wasString_Variant_Map
.What did you expect to see?
I expected the signal
PropertiesChanged
'stype
toa{sv}
What did you see instead?
but the result was
String_Variant_Map
The text was updated successfully, but these errors were encountered: