implement middleware compose

This commit is contained in:
yusing
2024-10-01 16:38:07 +08:00
parent f5a36f94bb
commit 44cfd65f6c
17 changed files with 392 additions and 152 deletions

View File

@@ -166,6 +166,8 @@ func (ne NestedError) Subject(s any) NestedError {
}
if ne.subject == "" {
ne.subject = subject
} else if !strings.ContainsRune(subject, ' ') || strings.ContainsRune(ne.subject, '.') {
ne.subject = fmt.Sprintf("%s.%s", subject, ne.subject)
} else {
ne.subject = fmt.Sprintf("%s > %s", subject, ne.subject)
}