mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 23:48:06 -05:00
Code inspect - clean ups (#8445)
This commit is contained in:
@@ -23,7 +23,7 @@ var Analyzer = &analysis.Analyzer{
|
||||
}
|
||||
|
||||
func run(pass *analysis.Pass) (interface{}, error) {
|
||||
inspect, ok := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
|
||||
inspection, ok := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
|
||||
if !ok {
|
||||
return nil, errors.New("analyzer is not type *inspector.Inspector")
|
||||
}
|
||||
@@ -32,7 +32,7 @@ func run(pass *analysis.Pass) (interface{}, error) {
|
||||
(*ast.StructType)(nil),
|
||||
}
|
||||
|
||||
inspect.Preorder(nodeFilter, func(node ast.Node) {
|
||||
inspection.Preorder(nodeFilter, func(node ast.Node) {
|
||||
if s, ok := node.(*ast.StructType); ok {
|
||||
if err := malign(node.Pos(), pass.TypesInfo.Types[s].Type.(*types.Struct)); err != nil {
|
||||
pass.Reportf(node.Pos(), err.Error())
|
||||
|
||||
Reference in New Issue
Block a user