IsEmptyExpr checks if an expression is the empty identifier
(expr ast.Expr)
| 188 | |
| 189 | // IsEmptyExpr checks if an expression is the empty identifier |
| 190 | func IsEmptyExpr(expr ast.Expr) bool { |
| 191 | if id, ok := expr.(*ast.Ident); ok { |
| 192 | if id.Name == "_" { |
| 193 | return true |
| 194 | } |
| 195 | } |
| 196 | return false |
| 197 | } |
| 198 | |
| 199 | // GetFieldVal returns the assigned value for the field at index. compElts holds the elements of the composite literal expression |
| 200 | // for struct initialization |
no outgoing calls
no test coverage detected