Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Commit

Permalink
Fix go 1.18 ast change causing panic
Browse files Browse the repository at this point in the history
  • Loading branch information
System-Glitch committed May 31, 2022
1 parent bda8625 commit 7881a09
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions route.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ func (c *RouteConverter) readDescription() (string, string) {
}

file, _ := handlerValue.FileLine(pc)
if file == "<autogenerated>" {
// Fix for Go 1.18 change
// https://github.com/golang/go/issues/51774

return funcName, ""
}
astFile := c.getAST(file)

var doc *ast.CommentGroup
Expand Down

0 comments on commit 7881a09

Please sign in to comment.