refactor and typo fixes

This commit is contained in:
yusing
2024-11-02 03:14:47 +08:00
parent 76454df5e6
commit a86d316d07
34 changed files with 160 additions and 128 deletions

View File

@@ -80,11 +80,12 @@ func FromEntries(entries entry.RawEntries) (Routes, E.Error) {
entries.RangeAllParallel(func(alias string, en *entry.RawEntry) {
en.Alias = alias
r, err := NewRoute(en)
if err != nil {
switch {
case err != nil:
b.Add(err.Subject(alias))
} else if entry.ShouldNotServe(r) {
case entry.ShouldNotServe(r):
return
} else {
default:
routes.Store(alias, r)
}
})