BUGFIX: race condition in engine; index page controller

This commit is contained in:
Simon Martens
2025-03-24 15:30:07 +01:00
parent 66fedf4baf
commit 4bff7fb17a
39 changed files with 59138 additions and 302 deletions

View File

@@ -42,7 +42,7 @@ func Iterate[T any](xmlData string, initialState T) iter.Seq2[*TokenResult[T], e
decoder := xml.NewDecoder(strings.NewReader(xmlData))
stack := []Element{}
state := initialState
return iter.Seq2[*TokenResult[T], error](func(yield func(*TokenResult[T], error) bool) {
return func(yield func(*TokenResult[T], error) bool) {
for {
token, err := decoder.Token()
if err == io.EOF {
@@ -117,7 +117,7 @@ func Iterate[T any](xmlData string, initialState T) iter.Seq2[*TokenResult[T], e
return
}
}
})
}
}
// mapAttributes converts xml.Attr to a map[string]string.