mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-27 03:21:09 +01:00
fix nil panic on null entry
This commit is contained in:
@@ -87,6 +87,9 @@ func FromEntries(entries RawEntries) (Routes, E.Error) {
|
||||
|
||||
routes := NewRoutes()
|
||||
entries.RangeAllParallel(func(alias string, en *RawEntry) {
|
||||
if en == nil {
|
||||
en = new(RawEntry)
|
||||
}
|
||||
en.Alias = alias
|
||||
if strings.HasPrefix(alias, "x-") { // x properties
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user