Just my OCD playing up 😉
This commit is contained in:
parent
b29c490f2d
commit
2edfd0e89d
|
@ -251,6 +251,12 @@ func (w *MapFieldWriter) setSet(
|
|||
schema *Schema) error {
|
||||
addrCopy := make([]string, len(addr), len(addr)+1)
|
||||
copy(addrCopy, addr)
|
||||
k := strings.Join(addr, ".")
|
||||
|
||||
if value == nil {
|
||||
w.result[k+".#"] = "0"
|
||||
return nil
|
||||
}
|
||||
|
||||
// If it is a slice, then we have to turn it into a *Set so that
|
||||
// we get the proper order back based on the hash code.
|
||||
|
@ -292,13 +298,6 @@ func (w *MapFieldWriter) setSet(
|
|||
value = s
|
||||
}
|
||||
|
||||
k := strings.Join(addr, ".")
|
||||
|
||||
if value == nil {
|
||||
w.result[k+".#"] = "0"
|
||||
return nil
|
||||
}
|
||||
|
||||
for code, elem := range value.(*Set).m {
|
||||
codeStr := strconv.FormatInt(int64(code), 10)
|
||||
if err := w.set(append(addrCopy, codeStr), elem); err != nil {
|
||||
|
|
Loading…
Reference in New Issue