fix incorrect prealloc

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Michael Muré
2025-06-12 18:21:02 +02:00
committed by GitHub
parent 377db50ef8
commit a30e345aef

View File

@@ -97,7 +97,7 @@ func fromAux(aux *aux) (*Document, error) {
}
res.controllers = []string{s}
case json.Unmarshal(aux.Controllers, &ss) == nil: // we have an array of strings
res.controllers = make([]string, len(aux.Controllers))
res.controllers = make([]string, len(ss))
for i, s := range ss {
if !did.HasValidDIDSyntax(s) {
return nil, errors.New("one controllers has an invalid DID syntax")