- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 58 for inspectors (0.81 sec)
-
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/composite/composite.go
} // runUnkeyedLiteral checks if a composite literal is a struct literal with // unkeyed fields. func run(pass *analysis.Pass) (interface{}, error) { inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) nodeFilter := []ast.Node{ (*ast.CompositeLit)(nil), } inspect.Preorder(nodeFilter, func(n ast.Node) { cl := n.(*ast.CompositeLit) typ := pass.TypesInfo.Types[cl].Type if typ == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 4.4K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/walk.go
// for each of the non-nil children of root, followed by a call of f(nil). // // See Walk for caveats about shared nodes. func Inspect(root Node, f func(Node) bool) { Walk(root, inspector(f)) } type inspector func(Node) bool func (v inspector) Visit(node Node) Visitor { if v(node) { return v } return nil } // Walk traverses an AST in pre-order: It starts by calling
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:55:04 UTC 2023 - 5.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package inspector // This file defines func typeOf(ast.Node) uint64. // // The initial map-based implementation was too slow; // see https://go-review.googlesource.com/c/tools/+/135655/1/go/ast/inspector/inspector.go#196 import ( "go/ast" "math" ) const ( nArrayType = iota nAssignStmt nBadDecl
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 4.8K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stringintconv/string.go
case *types.Basic: return t.Name() case hasTypeName: return t.Obj().Name() } return "" } func run(pass *analysis.Pass) (interface{}, error) { inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) nodeFilter := []ast.Node{ (*ast.CallExpr)(nil), } inspect.Preorder(nodeFilter, func(n ast.Node) { call := n.(*ast.CallExpr) if len(call.Args) != 1 { return } arg := call.Args[0]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 5.2K bytes - Viewed (0) -
src/go/ast/walk.go
case *Package: for _, f := range n.Files { Walk(v, f) } default: panic(fmt.Sprintf("ast.Walk: unexpected node type %T", n)) } v.Visit(nil) } type inspector func(Node) bool func (f inspector) Visit(node Node) Visitor { if f(node) { return f } return nil } // Inspect traverses an AST in depth-first order: It starts by calling
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:34:10 UTC 2024 - 6.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/bools/bools.go
Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, } func run(pass *analysis.Pass) (interface{}, error) { inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) nodeFilter := []ast.Node{ (*ast.BinaryExpr)(nil), } seen := make(map[*ast.BinaryExpr]bool) inspect.Preorder(nodeFilter, func(n ast.Node) { e := n.(*ast.BinaryExpr) if seen[e] {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 4.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stdmethods/stdmethods.go
"WriteTo": {[]string{"=io.Writer"}, []string{"int64", "error"}}, // io.WriterTo } func run(pass *analysis.Pass) (interface{}, error) { inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) nodeFilter := []ast.Node{ (*ast.FuncDecl)(nil), (*ast.InterfaceType)(nil), } inspect.Preorder(nodeFilter, func(n ast.Node) { switch n := n.(type) { case *ast.FuncDecl: if n.Recv != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 09 01:28:01 UTC 2023 - 6.9K bytes - Viewed (0) -
pilot/pkg/networking/core/filterchain_options.go
{ // client side traffic was detected as HTTP by the outbound listener, sent over mTLS ApplicationProtocols: mtlsHTTPALPNs, // If client sends mTLS traffic, transport protocol will be set by the TLS inspector TransportProtocol: xdsfilters.TLSTransportProtocol, Protocol: networking.ListenerProtocolHTTP, TLS: true, }, {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Mar 28 17:09:02 UTC 2024 - 8.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unreachable/unreachable.go
Requires: []*analysis.Analyzer{inspect.Analyzer}, RunDespiteErrors: true, Run: run, } func run(pass *analysis.Pass) (interface{}, error) { inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) nodeFilter := []ast.Node{ (*ast.FuncDecl)(nil), (*ast.FuncLit)(nil), } inspect.Preorder(nodeFilter, func(n ast.Node) { var body *ast.BlockStmt switch n := n.(type) { case *ast.FuncDecl:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 09 01:28:01 UTC 2023 - 7.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/slog/slog.go
unknown ) func run(pass *analysis.Pass) (any, error) { var attrType types.Type // The type of slog.Attr inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) nodeFilter := []ast.Node{ (*ast.CallExpr)(nil), } inspect.Preorder(nodeFilter, func(node ast.Node) { call := node.(*ast.CallExpr) fn := typeutil.StaticCallee(pass.TypesInfo, call) if fn == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 7.2K bytes - Viewed (0)