- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for parseFunc (0.16 sec)
-
src/go/printer/example_test.go
// license that can be found in the LICENSE file. package printer_test import ( "bytes" "fmt" "go/ast" "go/parser" "go/printer" "go/token" "strings" ) func parseFunc(filename, functionname string) (fun *ast.FuncDecl, fset *token.FileSet) { fset = token.NewFileSet() if file, err := parser.ParseFile(fset, filename, nil, 0); err == nil { for _, d := range file.Decls {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 16 14:55:02 UTC 2022 - 1.7K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/genericclioptions/record_flags.go
return "" } flags := "" parseFunc := func(flag *pflag.Flag, value string) error { flags = flags + " --" + flag.Name if set, ok := flag.Annotations["classified"]; !ok || len(set) == 0 { flags = flags + "=" + value } else { flags = flags + "=CLASSIFIED" } return nil } var err error err = cmd.Flags().ParseAll(os.Args[1:], parseFunc) if err != nil || !cmd.Flags().Parsed() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 28 08:48:22 UTC 2024 - 5.5K bytes - Viewed (0) -
src/go/internal/gccgoimporter/parser.go
results := p.parseResultList(pkg) *t = *types.NewSignatureType(nil, nil, nil, params, results, isVariadic) return t } // Func = Name FunctionType [InlineBody] . func (p *parser) parseFunc(pkg *types.Package) *types.Func { if p.tok == '/' { // Skip an /*asm ID */ comment. p.expect('/') p.expect('*') if p.expect(scanner.Ident) == "asm" { p.parseUnquotedString() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 02 23:14:07 UTC 2024 - 31.2K bytes - Viewed (0) -
src/text/template/template.go
option option // We use two maps, one for parsing and one for execution. // This separation makes the API cleaner since it doesn't // expose reflection to the client. muFuncs sync.RWMutex // protects parseFuncs and execFuncs parseFuncs FuncMap execFuncs map[string]reflect.Value } // Template is the representation of a parsed template. The *parse.Tree // field is exported only for use by [html/template] and should be treated
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:57:51 UTC 2024 - 7.2K bytes - Viewed (0)