getNodeModifiers returns the modifier list from a function-like node.
(node *ast.Node)
| 216 | |
| 217 | // getNodeModifiers returns the modifier list from a function-like node. |
| 218 | func getNodeModifiers(node *ast.Node) *ast.ModifierList { |
| 219 | switch node.Kind { |
| 220 | case ast.KindFunctionDeclaration: |
| 221 | return node.AsFunctionDeclaration().Modifiers() |
| 222 | case ast.KindMethodDeclaration: |
| 223 | return node.AsMethodDeclaration().Modifiers() |
| 224 | } |
| 225 | return nil |
| 226 | } |
no outgoing calls
no test coverage detected