test: improvement on the generator, small fixes

This commit is contained in:
Michael Muré
2024-12-04 19:55:29 +01:00
parent 72e0f353e7
commit 0f59088d0b
9 changed files with 268 additions and 98 deletions

View File

@@ -129,3 +129,15 @@ func Personas() []Persona {
PersonaFrank,
}
}
// DidToName retrieve the persona's name from its DID.
func DidToName(d did.DID) string {
return map[did.DID]string{
PersonaAlice.DID(): "Alice",
PersonaBob.DID(): "Bob",
PersonaCarol.DID(): "Carol",
PersonaDan.DID(): "Dan",
PersonaErin.DID(): "Erin",
PersonaFrank.DID(): "Frank",
}[d]
}