- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for fnDecls (0.11 sec)
-
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine/util.go
var fnDecls map[*types.Func]*ast.FuncDecl // computed lazily return func(f *types.Func) *ast.FuncDecl { if f != nil && fnDecls == nil { fnDecls = make(map[*types.Func]*ast.FuncDecl) for _, file := range files { for _, decl := range file.Decls { if fnDecl, ok := decl.(*ast.FuncDecl); ok { if fn, ok := info.Defs[fnDecl.Name].(*types.Func); ok { fnDecls[fn] = fnDecl
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/go/ast/filter.go
ndocs := 0 ncomments := 0 ndecls := 0 filenames := make([]string, len(pkg.Files)) var minPos, maxPos token.Pos i := 0 for filename, f := range pkg.Files { filenames[i] = filename i++ if f.Doc != nil { ndocs += len(f.Doc.List) + 1 // +1 for separator } ncomments += len(f.Comments) ndecls += len(f.Decls) if i == 0 || f.FileStart < minPos {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 13.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/testinggoroutine/testinggoroutine.go
} } } return true }) } return nil, nil } func hasBenchmarkOrTestParams(fnDecl *ast.FuncDecl) bool { // Check that the function's arguments include "*testing.T" or "*testing.B". params := fnDecl.Type.Params.List for _, param := range params { if _, ok := typeIsTestingDotTOrB(param.Type); ok { return true } } return false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 7.8K bytes - Viewed (0)