mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +02:00
fix nil panic on null entry
This commit is contained in:
parent
bc2335a54e
commit
0850562bf9
1 changed files with 3 additions and 0 deletions
|
@ -87,6 +87,9 @@ func FromEntries(entries RawEntries) (Routes, E.Error) {
|
||||||
|
|
||||||
routes := NewRoutes()
|
routes := NewRoutes()
|
||||||
entries.RangeAllParallel(func(alias string, en *RawEntry) {
|
entries.RangeAllParallel(func(alias string, en *RawEntry) {
|
||||||
|
if en == nil {
|
||||||
|
en = new(RawEntry)
|
||||||
|
}
|
||||||
en.Alias = alias
|
en.Alias = alias
|
||||||
if strings.HasPrefix(alias, "x-") { // x properties
|
if strings.HasPrefix(alias, "x-") { // x properties
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue