checking in- needs some refinement then done
This commit is contained in:
27
netsplit/funcs_ianaregistryfootnote.go
Normal file
27
netsplit/funcs_ianaregistryfootnote.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package netsplit
|
||||
|
||||
import (
|
||||
`encoding/xml`
|
||||
`strconv`
|
||||
)
|
||||
|
||||
func (i *IANARegistryFootnote) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error) {
|
||||
|
||||
var u64 uint64
|
||||
|
||||
for _, a := range start.Attr {
|
||||
switch a.Name.Local {
|
||||
case "anchor":
|
||||
if u64, err = strconv.ParseUint(a.Value, 10, 64); err != nil {
|
||||
return
|
||||
}
|
||||
i.ReferenceIdx = uint(u64)
|
||||
}
|
||||
}
|
||||
|
||||
if err = d.DecodeElement(&i.Note, &start); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user