mirror of
https://github.com/go-gitea/gitea
synced 2024-09-19 02:06:04 +00:00
9fe4437bda
* Use vendored go-swagger * vendor go-swagger * revert un wanteed change * remove un-needed GO111MODULE * Update Makefile Co-Authored-By: techknowlogick <matti@mdranta.net>
15 lines
211 B
Go
15 lines
211 B
Go
package astutil
|
|
|
|
import "go/ast"
|
|
|
|
// Unparen returns e with any enclosing parentheses stripped.
|
|
func Unparen(e ast.Expr) ast.Expr {
|
|
for {
|
|
p, ok := e.(*ast.ParenExpr)
|
|
if !ok {
|
|
return e
|
|
}
|
|
e = p.X
|
|
}
|
|
}
|