- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 486 for parseDir (0.18 sec)
-
src/go/doc/doc_test.go
t.Fatal(err) } filter = func(fi fs.FileInfo) bool { return isGoFile(fi) && rx.MatchString(fi.Name()) } } // get packages fset := token.NewFileSet() pkgs, err := parser.ParseDir(fset, dataDir, filter, parser.ParseComments) if err != nil { t.Fatal(err) } // test packages for _, pkg := range pkgs { t.Run(pkg.Name, func(t *testing.T) { importPath := dataDir + "/" + pkg.Name
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:31:52 UTC 2022 - 6.7K bytes - Viewed (0) -
src/cmd/doc/pkg.go
} } for _, name := range pkg.CgoFiles { if name == info.Name() { return true } } return false } fset := token.NewFileSet() pkgs, err := parser.ParseDir(fset, pkg.Dir, include, parser.ParseComments) if err != nil { log.Fatal(err) } // Make sure they are all in one package. if len(pkgs) == 0 { log.Fatalf("no source-code package in directory %s", pkg.Dir) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 08 20:15:52 UTC 2024 - 32K bytes - Viewed (0) -
pkg/test/echo/server/endpoint/util.go
idleTimeout = 5 * time.Second ) func listenOnAddress(ip string, port int) (net.Listener, int, error) { parsedIP := net.ParseIP(ip) ipBind := "tcp" if parsedIP != nil { if parsedIP.To4() == nil && parsedIP.To16() != nil { ipBind = "tcp6" } else if parsedIP.To4() != nil { ipBind = "tcp4" } } ln, err := net.Listen(ipBind, net.JoinHostPort(ip, strconv.Itoa(port))) if err != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 2.6K bytes - Viewed (0) -
src/go/printer/testdata/parser.go
// license that can be found in the LICENSE file. // Package parser implements a parser for Go source files. Input may be // provided in a variety of forms (see the various Parse* functions); the // output is an abstract syntax tree (AST) representing the Go source. The // parser is invoked through one of the Parse* functions. package parser import ( "fmt" "go/ast" "go/scanner" "go/token" )
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 20:19:51 UTC 2023 - 50.5K bytes - Viewed (0) -
hack/verify-netparse-cve.sh
echo >&2 echo "Run ./hack/update-netparse-cve.sh" >&2 echo >&2 rc=1 fi # find files using net.ParseCIDR() netparsecidrs_matches=$(find_files | xargs grep -nE "net.ParseCIDR\(.*\)" 2>/dev/null) || true if [[ -n "${netparsecidrs_matches}" ]]; then echo "net.ParseCIDR reject leading zeros in the dot-decimal notation of IPv4 addresses since golang 1.17:" >&2 echo "${netparsecidrs_matches}" >&2 echo >&2
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 06:07:31 UTC 2024 - 2.3K bytes - Viewed (0) -
src/go/parser/parser.go
fmt.Println(a...) } func trace(p *parser, msg string) *parser { p.printTrace(msg, "(") p.indent++ return p } // Usage pattern: defer un(trace(p, "...")) func un(p *parser) { p.indent-- p.printTrace(")") } // maxNestLev is the deepest we're willing to recurse during parsing const maxNestLev int = 1e5 func incNestLev(p *parser) *parser { p.nestLev++ if p.nestLev > maxNestLev {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 08 20:07:50 UTC 2023 - 72.2K bytes - Viewed (0) -
src/crypto/x509/parser.go
} rdnSet = append(rdnSet, attr) } rdnSeq = append(rdnSeq, rdnSet) } return &rdnSeq, nil } func parseAI(der cryptobyte.String) (pkix.AlgorithmIdentifier, error) { ai := pkix.AlgorithmIdentifier{} if !der.ReadASN1ObjectIdentifier(&ai.Algorithm) { return ai, errors.New("x509: malformed OID") } if der.Empty() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:00:16 UTC 2024 - 38.5K bytes - Viewed (0) -
src/go/internal/gccgoimporter/parser.go
} func (p *parser) error(err any) { if s, ok := err.(string); ok { err = errors.New(s) } // panic with a runtime.Error if err is not an error panic(importError{p.scanner.Pos(), err.(error)}) } func (p *parser) errorf(format string, args ...any) { p.error(fmt.Errorf(format, args...)) } func (p *parser) expect(tok rune) string { lit := p.lit if p.tok != tok {
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/net/ip_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 07 01:17:29 UTC 2024 - 25.7K bytes - Viewed (0) -
src/net/ip.go
} // ParseIP parses s as an IP address, returning the result. // The string s can be in IPv4 dotted decimal ("192.0.2.1"), IPv6 // ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") form. // If s is not a valid textual representation of an IP address, // ParseIP returns nil. func ParseIP(s string) IP { if addr, valid := parseIP(s); valid { return IP(addr[:]) } return nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 18 03:13:26 UTC 2024 - 13.9K bytes - Viewed (0)