- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for funcList (0.3 sec)
-
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow/ctrlflow.go
// (We could build CFGs for FuncLits lazily, // but the benefit is marginal.) // Pass 1. Map types.Funcs to ast.FuncDecls in this package. funcDecls := make(map[*types.Func]*declInfo) // functions and methods funcLits := make(map[*ast.FuncLit]*litInfo) var decls []*types.Func // keys(funcDecls), in order var lits []*ast.FuncLit // keys(funcLits), in order nodeFilter := []ast.Node{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 09 01:28:01 UTC 2023 - 6.6K bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/host/host.go
// the command line do not have overlapping symbols. That is, // unnamed1.so/FuncInt and unnamed2.so/FuncInt should be distinct functions. func testUnnamed() { p, err := plugin.Open("unnamed1.so") if err != nil { log.Fatalf(`plugin.Open("unnamed1.so"): %v`, err) } fn, err := p.Lookup("FuncInt") if err != nil { log.Fatalf(`unnamed1.so: Lookup("FuncInt") failed: %v`, err) } if got, want := fn.(func() int)(), 1; got != want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 4.9K bytes - Viewed (0) -
src/go/printer/example_test.go
// file set fset. funcAST, fset := parseFunc("example_test.go", "printSelf") // Print the function body into buffer buf. // The file set is provided to the printer so that it knows // about the original source formatting and can add additional // line breaks where they were present in the source. var buf bytes.Buffer printer.Fprint(&buf, fset, funcAST.Body)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 16 14:55:02 UTC 2022 - 1.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine/util.go
id, _ := x.(*ast.Ident) return id case *ast.Ident: return fun default: return nil } } // funcLitInScope returns a FuncLit that id is at least initially assigned to. // // TODO: This is closely tied to id.Obj which is deprecated. func funcLitInScope(id *ast.Ident) *ast.FuncLit { // Compare to (*ast.Object).Pos(). if id.Obj == nil { return nil } var rhs ast.Expr switch d := id.Obj.Decl.(type) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 2.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/lostcancel/lostcancel.go
nodeTypes := []ast.Node{ (*ast.FuncLit)(nil), (*ast.FuncDecl)(nil), } inspect.Preorder(nodeTypes, func(n ast.Node) { runFunc(pass, n) }) return nil, nil } func runFunc(pass *analysis.Pass, node ast.Node) { // Find scope of function node var funcScope *types.Scope switch v := node.(type) { case *ast.FuncLit: funcScope = pass.TypesInfo.Scopes[v.Type] case *ast.FuncDecl:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 19:00:13 UTC 2024 - 9K bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/unnamed1/main.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build ignore package main // // No C code required. import "C" func FuncInt() int { return 1 } // Add a recursive type to check that type equality across plugins doesn't // crash. See https://golang.org/issues/19258 func FuncRecursive() X { return X{} } type Y struct { X *X }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 487 bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/apitesting/fuzzer/fuzzer.go
f := fuzz.New().NilChance(.5).NumElements(0, 1) if src != nil { f.RandSource(src) } f.Funcs(funcs(codecs)...) return f } // MergeFuzzerFuncs will merge the given funcLists, overriding early funcs with later ones if there first // argument has the same type. func MergeFuzzerFuncs(funcs ...FuzzerFuncs) FuzzerFuncs { return FuzzerFuncs(func(codecs runtimeserializer.CodecFactory) []interface{} {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Aug 01 19:31:12 UTC 2018 - 1.6K bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/unnamed2/main.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build ignore package main // // No C code required. import "C" func FuncInt() int { return 2 } func FuncRecursive() X { return X{} } type Y struct { X *X } type X struct { Y Y }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 366 bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/defers/defers.go
case *ast.CallExpr: if analysisutil.IsFunctionNamed(typeutil.StaticCallee(pass.TypesInfo, v), "time", "Since") { pass.Reportf(v.Pos(), "call to time.Since is not deferred") } case *ast.FuncLit: return false // prune } return true } inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector) nodeFilter := []ast.Node{ (*ast.DeferStmt)(nil), }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 1.4K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/positions.go
// case *BadExpr: // case *Name: // case *BasicLit: case *CompositeLit: if n.Type != nil { m = n.Type continue } return n.Pos() case *KeyValueExpr: m = n.Key // case *FuncLit: // case *ParenExpr: case *SelectorExpr: m = n.X case *IndexExpr: m = n.X // case *SliceExpr: case *AssertExpr: m = n.X case *TypeSwitchGuard: if n.Lhs != nil { m = n.Lhs
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 17:49:19 UTC 2024 - 6.5K bytes - Viewed (0)